mirror of
https://github.com/lubosz/overte.git
synced 2025-04-27 01:15:36 +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
interface
|
@ -30,7 +30,7 @@ LoginDialog::LoginDialog(QWidget* parent) :
|
|||
_ui->setupUi(this);
|
||||
_ui->errorLabel->hide();
|
||||
_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->infoLabel->setVisible(false);
|
||||
_ui->errorLabel->setVisible(false);
|
||||
|
@ -46,8 +46,6 @@ LoginDialog::LoginDialog(QWidget* parent) :
|
|||
this, &LoginDialog::handleLoginClicked);
|
||||
connect(_ui->closeButton, &QPushButton::clicked,
|
||||
this, &LoginDialog::close);
|
||||
connect(_ui->forgotPasswordButton, &QPushButton::clicked,
|
||||
this, &LoginDialog::handleForgotPasswordClicked);
|
||||
};
|
||||
|
||||
LoginDialog::~LoginDialog() {
|
||||
|
@ -61,8 +59,6 @@ void LoginDialog::handleLoginCompleted(const QUrl& authURL) {
|
|||
};
|
||||
|
||||
void LoginDialog::handleLoginFailed() {
|
||||
_ui->errorLabel->setText("Login Failure: Invalid username or password");
|
||||
|
||||
_ui->infoLabel->setVisible(false);
|
||||
_ui->errorLabel->setVisible(true);
|
||||
|
||||
|
@ -81,7 +77,6 @@ void LoginDialog::handleLoginClicked() {
|
|||
} else if (_ui->passwordLineEdit->text().isEmpty()) {
|
||||
_ui->passwordLineEdit->setFocus();
|
||||
} else {
|
||||
_ui->infoLabel->setText("Authenticating...");
|
||||
_ui->infoLabel->setVisible(true);
|
||||
_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) {
|
||||
// Modal dialogs seemed to get repositioned automatically. Combat this by moving the window if needed.
|
||||
resizeAndPosition();
|
||||
|
|
|
@ -28,7 +28,6 @@ public:
|
|||
|
||||
public slots:
|
||||
void handleLoginClicked();
|
||||
void handleForgotPasswordClicked();
|
||||
void handleLoginCompleted(const QUrl& authURL);
|
||||
void handleLoginFailed();
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
@ -82,38 +82,71 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="infoLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Helvetica,Arial,sans-serif</family>
|
||||
<pointsize>18</pointsize>
|
||||
</font>
|
||||
</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>
|
||||
<widget class="QWidget" name="errorMessages" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>825</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</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>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -389,7 +422,7 @@ border-width: 1px; border-style: solid; border-radius: 3px; border-color: #aaa;
|
|||
<property name="styleSheet">
|
||||
<string notr="true">
|
||||
background: #0e7077;
|
||||
color: #fff;
|
||||
color: #e7eeee;
|
||||
border-radius: 4px; padding-top: 1px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -414,40 +447,20 @@ border-radius: 4px; padding-top: 1px;</string>
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="forgotPasswordButton">
|
||||
<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>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Helvetica,Arial,sans-serif</family>
|
||||
<pointsize>16</pointsize>
|
||||
<pointsize>17</pointsize>
|
||||
</font>
|
||||
</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">
|
||||
<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 name="default">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
Loading…
Reference in a new issue