ShareDialog: use auto-raising tool buttons as confirm buttons

This commit is contained in:
J-P Nurmi 2018-11-16 21:11:55 +01:00
parent df802472cb
commit 96d0059ca4
3 changed files with 7 additions and 79 deletions

View File

@ -292,39 +292,12 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="confirmPassword">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>18</width>
<height>26</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>18</width>
<height>16777215</height>
</size>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 0);</string>
</property>
<property name="text">
<string/>
</property>
<widget class="QToolButton" name="confirmPassword">
<property name="icon">
<iconset resource="../../client.qrc">
<normaloff>:/client/resources/confirm.svg</normaloff>:/client/resources/confirm.svg</iconset>
</property>
<property name="flat">
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
@ -413,33 +386,12 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="confirmExpirationDate">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>18</width>
<height>26</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>18</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<widget class="QToolButton" name="confirmExpirationDate">
<property name="icon">
<iconset resource="../../client.qrc">
<normaloff>:/client/resources/confirm.svg</normaloff>:/client/resources/confirm.svg</iconset>
</property>
<property name="flat">
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>

View File

@ -87,7 +87,7 @@ ShareUserGroupWidget::ShareUserGroupWidget(AccountPtr account,
connect(_manager, &ShareManager::shareCreated, this, &ShareUserGroupWidget::getShares);
connect(_manager, &ShareManager::serverError, this, &ShareUserGroupWidget::displayError);
connect(_ui->shareeLineEdit, &QLineEdit::returnPressed, this, &ShareUserGroupWidget::slotLineEditReturn);
connect(_ui->confirmShare, &QPushButton::clicked, this, &ShareUserGroupWidget::slotLineEditReturn);
connect(_ui->confirmShare, &QAbstractButton::clicked, this, &ShareUserGroupWidget::slotLineEditReturn);
//TODO connect(_ui->privateLinkText, &QLabel::linkActivated, this, &ShareUserGroupWidget::slotPrivateLinkShare);
// By making the next two QueuedConnections we can override

View File

@ -99,36 +99,12 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="confirmShare">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>18</width>
<height>26</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>18</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string/>
</property>
<widget class="QToolButton" name="confirmShare">
<property name="icon">
<iconset resource="../../client.qrc">
<normaloff>:/client/resources/confirm.svg</normaloff>:/client/resources/confirm.svg</iconset>
</property>
<property name="flat">
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>