Commit d4ee26a7 authored by Scott Harvey's avatar Scott Harvey Committed by Scott Harvey

Align lock icon with bold message text; reduce overall size of dialog

Summary: Adjusted spacers in UI file to properly align icon with message text. Also attempt to minimize white space in dialog box by hiding UI elements until they are needed. (Set `height` to `1`, then restore to original layout size.)

Test Plan:
- Compile polkit-kde-agent-1 with patch
- Trigger a root password request window (launch Synaptic, try to change SDDM in System Settings)
- Ensure that lock icon is aligned with bold headline text

Reviewers: davidedmundson, ngraham, abetts, #frameworks

Reviewed By: davidedmundson, ngraham, abetts

Subscribers: stikonas, bruns, ltoscano, broulik, davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D12311
parent d3d8300c
......@@ -214,6 +214,7 @@ void AuthDialog::createUserCB(const PolkitQt1::Identity::List &identities)
* doing it again.. (this is mainly used when the user entered the
* wrong password and the dialog is recycled)
*/
if (identities.count() && (userCB->count() - 1) != identities.count()) {
// Clears the combobox in the case some user be added
userCB->clear();
......
......@@ -7,11 +7,11 @@
<x>0</x>
<y>0</y>
<width>511</width>
<height>344</height>
<height>260</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
......@@ -19,41 +19,18 @@
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="lblPixmap">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">&amp;Lock Icon here</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="buddy">
<cstring>lePassword</cstring>
</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>92</height>
</size>
</property>
</spacer>
</item>
</layout>
<property name="spacing">
<number>6</number>
</property>
<item row="3" column="2">
<widget class="QLineEdit" name="lePassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
<property name="passwordMode" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout_2">
......@@ -94,11 +71,28 @@
</item>
</layout>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="userCB"/>
<item row="1" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1" colspan="2">
<widget class="KMessageWidget" name="errorMessageWidget"/>
<widget class="KMessageWidget" name="errorMessageWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="lblPassword">
......@@ -110,16 +104,58 @@
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="lePassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="userCB">
<property name="enabled">
<bool>true</bool>
</property>
<property name="passwordMode" stdset="0">
<bool>false</bool>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="lblPixmap">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">&amp;Lock Icon here</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="buddy">
<cstring>lePassword</cstring>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item>
......@@ -139,7 +175,7 @@
<customwidgets>
<customwidget>
<class>KMessageWidget</class>
<extends>QWidget</extends>
<extends>QFrame</extends>
<header>kmessagewidget.h</header>
</customwidget>
</customwidgets>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment