mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:56:55 +02:00
Update layout of login messages and move text to .ui file
This commit is contained in:
parent
46d4a31f01
commit
24350761ac
3 changed files with 74 additions and 71 deletions
|
@ -30,7 +30,7 @@ LoginDialog::LoginDialog(QWidget* parent) :
|
||||||
_ui->setupUi(this);
|
_ui->setupUi(this);
|
||||||
_ui->errorLabel->hide();
|
_ui->errorLabel->hide();
|
||||||
_ui->emailLineEdit->setFocus();
|
_ui->emailLineEdit->setFocus();
|
||||||
_ui->logoLabel->setPixmap(QPixmap(Application::resourcesPath() + "images/hifi-logo.png"));
|
_ui->logoLabel->setPixmap(QPixmap(Application::resourcesPath() + "images/hifi-logo.svg"));
|
||||||
_ui->loginButton->setIcon(QIcon(Application::resourcesPath() + "images/login.svg"));
|
_ui->loginButton->setIcon(QIcon(Application::resourcesPath() + "images/login.svg"));
|
||||||
_ui->infoLabel->setVisible(false);
|
_ui->infoLabel->setVisible(false);
|
||||||
_ui->errorLabel->setVisible(false);
|
_ui->errorLabel->setVisible(false);
|
||||||
|
@ -46,8 +46,6 @@ LoginDialog::LoginDialog(QWidget* parent) :
|
||||||
this, &LoginDialog::handleLoginClicked);
|
this, &LoginDialog::handleLoginClicked);
|
||||||
connect(_ui->closeButton, &QPushButton::clicked,
|
connect(_ui->closeButton, &QPushButton::clicked,
|
||||||
this, &LoginDialog::close);
|
this, &LoginDialog::close);
|
||||||
connect(_ui->forgotPasswordButton, &QPushButton::clicked,
|
|
||||||
this, &LoginDialog::handleForgotPasswordClicked);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
LoginDialog::~LoginDialog() {
|
LoginDialog::~LoginDialog() {
|
||||||
|
@ -61,8 +59,6 @@ void LoginDialog::handleLoginCompleted(const QUrl& authURL) {
|
||||||
};
|
};
|
||||||
|
|
||||||
void LoginDialog::handleLoginFailed() {
|
void LoginDialog::handleLoginFailed() {
|
||||||
_ui->errorLabel->setText("Login Failure: Invalid username or password");
|
|
||||||
|
|
||||||
_ui->infoLabel->setVisible(false);
|
_ui->infoLabel->setVisible(false);
|
||||||
_ui->errorLabel->setVisible(true);
|
_ui->errorLabel->setVisible(true);
|
||||||
|
|
||||||
|
@ -81,7 +77,6 @@ void LoginDialog::handleLoginClicked() {
|
||||||
} else if (_ui->passwordLineEdit->text().isEmpty()) {
|
} else if (_ui->passwordLineEdit->text().isEmpty()) {
|
||||||
_ui->passwordLineEdit->setFocus();
|
_ui->passwordLineEdit->setFocus();
|
||||||
} else {
|
} else {
|
||||||
_ui->infoLabel->setText("Authenticating...");
|
|
||||||
_ui->infoLabel->setVisible(true);
|
_ui->infoLabel->setVisible(true);
|
||||||
_ui->errorLabel->setVisible(false);
|
_ui->errorLabel->setVisible(false);
|
||||||
|
|
||||||
|
@ -90,10 +85,6 @@ void LoginDialog::handleLoginClicked() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void LoginDialog::handleForgotPasswordClicked() {
|
|
||||||
Menu::getInstance()->openUrl(FORGOT_PASSWORD_URL);
|
|
||||||
};
|
|
||||||
|
|
||||||
void LoginDialog::moveEvent(QMoveEvent* event) {
|
void LoginDialog::moveEvent(QMoveEvent* event) {
|
||||||
// Modal dialogs seemed to get repositioned automatically. Combat this by moving the window if needed.
|
// Modal dialogs seemed to get repositioned automatically. Combat this by moving the window if needed.
|
||||||
resizeAndPosition();
|
resizeAndPosition();
|
||||||
|
|
|
@ -28,7 +28,6 @@ public:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void handleLoginClicked();
|
void handleLoginClicked();
|
||||||
void handleForgotPasswordClicked();
|
|
||||||
void handleLoginCompleted(const QUrl& authURL);
|
void handleLoginCompleted(const QUrl& authURL);
|
||||||
void handleLoginFailed();
|
void handleLoginFailed();
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="horizontalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -82,38 +82,71 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="infoLabel">
|
<widget class="QWidget" name="errorMessages" native="true">
|
||||||
<property name="font">
|
<property name="minimumSize">
|
||||||
<font>
|
<size>
|
||||||
<family>Helvetica,Arial,sans-serif</family>
|
<width>825</width>
|
||||||
<pointsize>18</pointsize>
|
<height>0</height>
|
||||||
</font>
|
</size>
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Message</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="errorLabel">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Helvetica,Arial,sans-serif</family>
|
|
||||||
<pointsize>18</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: red</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Error</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="infoLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Helvetica,Arial,sans-serif</family>
|
||||||
|
<pointsize>17</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Authenticating...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="errorLabel">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Helvetica,Arial,sans-serif</family>
|
||||||
|
<pointsize>17</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: #992800;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><style type="text/css">
|
||||||
|
a { text-decoration: none; color: #267077;}
|
||||||
|
</style>
|
||||||
|
Invalid username or password. <a href="https://data-web.highfidelity.io/password/new">Recover?</a></string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -389,7 +422,7 @@ border-width: 1px; border-style: solid; border-radius: 3px; border-color: #aaa;
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">
|
<string notr="true">
|
||||||
background: #0e7077;
|
background: #0e7077;
|
||||||
color: #fff;
|
color: #e7eeee;
|
||||||
border-radius: 4px; padding-top: 1px;</string>
|
border-radius: 4px; padding-top: 1px;</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -414,40 +447,20 @@ border-radius: 4px; padding-top: 1px;</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="forgotPasswordButton">
|
<widget class="QLabel" name="label">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>141</width>
|
|
||||||
<height>26</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Helvetica,Arial,sans-serif</family>
|
<family>Helvetica,Arial,sans-serif</family>
|
||||||
<pointsize>16</pointsize>
|
<pointsize>17</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="cursor">
|
|
||||||
<cursorShape>PointingHandCursor</cursorShape>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: #0e7077;
|
|
||||||
background: rgba(0, 0, 0, 0);
|
|
||||||
border-radius: 4px;</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Recover Password?</string>
|
<string><style type="text/css">
|
||||||
|
a { text-decoration: none; color: #267077;}
|
||||||
|
</style>
|
||||||
|
<a href="https://data-web.highfidelity.io/password/new">Recover password?</a></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="default">
|
<property name="openExternalLinks">
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
Loading…
Reference in a new issue