Skip to content

Commit

Permalink
update runwizard introduction screen
Browse files Browse the repository at this point in the history
Signed-off-by: Ankur Bavisa <[email protected]>
  • Loading branch information
AnkurBavisa authored and mgallien committed Jan 13, 2025
1 parent d69a8aa commit ddc4d4f
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 62 deletions.
18 changes: 8 additions & 10 deletions src/gui/wizard/flow2authwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Flow2AuthWidget::Flow2AuthWidget(QWidget *parent)
WizardCommon::initErrorLabel(_ui.errorLabel);
_ui.errorLabel->setTextFormat(Qt::RichText);

connect(_ui.openLinkLabel, &LinkLabel::clicked, this, &Flow2AuthWidget::slotOpenBrowser);
connect(_ui.copyLinkLabel, &LinkLabel::clicked, this, &Flow2AuthWidget::slotCopyLinkToClipboard);
connect(_ui.openLinkButton, &QPushButton::clicked, this, &Flow2AuthWidget::slotOpenBrowser);
connect(_ui.copyLinkButton, &QPushButton::clicked, this, &Flow2AuthWidget::slotCopyLinkToClipboard);

auto sizePolicy = _progressIndi->sizePolicy();
sizePolicy.setRetainSizeWhenHidden(true);
Expand Down Expand Up @@ -186,8 +186,8 @@ void Flow2AuthWidget::startSpinner()
_progressIndi->setVisible(true);
_progressIndi->startAnimation();

_ui.openLinkLabel->setEnabled(false);
_ui.copyLinkLabel->setEnabled(false);
_ui.openLinkButton->setEnabled(false);
_ui.copyLinkButton->setEnabled(false);
}

void Flow2AuthWidget::stopSpinner(bool showStatusLabel)
Expand All @@ -197,8 +197,8 @@ void Flow2AuthWidget::stopSpinner(bool showStatusLabel)
_progressIndi->setVisible(false);
_progressIndi->stopAnimation();

_ui.openLinkLabel->setEnabled(_statusUpdateSkipCount == 0);
_ui.copyLinkLabel->setEnabled(_statusUpdateSkipCount == 0);
_ui.openLinkButton->setEnabled(_statusUpdateSkipCount == 0);
_ui.copyLinkButton->setEnabled(_statusUpdateSkipCount == 0);
}

void Flow2AuthWidget::slotStyleChanged()
Expand All @@ -219,11 +219,9 @@ void Flow2AuthWidget::customizeStyle()
}
}

_ui.openLinkLabel->setText(tr("Reopen Browser"));
_ui.openLinkLabel->setAlignment(Qt::AlignCenter);
_ui.openLinkButton->setText(tr("Open Browser"));

_ui.copyLinkLabel->setText(tr("Copy Link"));
_ui.copyLinkLabel->setAlignment(Qt::AlignCenter);
_ui.copyLinkButton->setText(tr("Copy Link"));

WizardCommon::customizeHintLabel(_ui.statusLabel);
}
Expand Down
164 changes: 112 additions & 52 deletions src/gui/wizard/flow2authwidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>580</width>
<height>330</height>
<width>597</width>
<height>387</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -25,31 +25,22 @@
<property name="windowTitle">
<string>Browser Authentication</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<spacer name="verticalSpacer_3">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>80</height>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="logoLabel">
<property name="text">
Expand All @@ -60,12 +51,24 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>32</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
Expand All @@ -80,6 +83,22 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="statusLabel">
<property name="text">
Expand All @@ -94,13 +113,36 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="topMargin">
<number>0</number>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>32</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="progressLayout"/>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>64</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
Expand All @@ -115,15 +157,54 @@
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="topMargin">
<number>0</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="OCC::LinkLabel" name="copyLinkLabel" native="true"/>
<widget class="QPushButton" name="copyLinkButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string notr="true">pbSelectLocalFolder</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
<property name="default">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="OCC::LinkLabel" name="openLinkLabel" native="true"/>
<widget class="QPushButton" name="openLinkButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string notr="true">pbSelectLocalFolder</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
<property name="default">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
Expand Down Expand Up @@ -155,47 +236,26 @@
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="progressLayout"/>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_2">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>80</height>
<height>60</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>OCC::LinkLabel</class>
<extends>QWidget</extends>
<header>wizard/linklabel.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

0 comments on commit ddc4d4f

Please sign in to comment.