Skip to content

Commit

Permalink
swap trash can for minus sign, right allign add/remove
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtedde committed Sep 10, 2023
1 parent 58e97b2 commit cee91aa
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 23 deletions.
65 changes: 45 additions & 20 deletions src/vorta/assets/UI/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<property name="fixedSize">
<size>
<width>200</width>
<height>350</height>
<height>400</height>
</size>
</property>
<property name="verticalScrollBarPolicy">
Expand All @@ -48,31 +48,15 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QToolButton" name="profileAddButton">
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="profileRenameButton">
<property name="toolTip">
<string>Rename current profile</string>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
<width>25</width>
<height>25</height>
</size>
</property>
</widget>
Expand All @@ -82,21 +66,62 @@
<property name="toolTip">
<string>Export current profile</string>
</property>
<property name="iconSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="profileDeleteButton">
<property name="toolTip">
<string>Delete current profile</string>
</property>
<property name="iconSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="profileAddButton">
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
Expand Down Expand Up @@ -139,7 +164,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>100</height>
<height>20</height>
</size>
</property>
</spacer>
Expand Down
6 changes: 3 additions & 3 deletions src/vorta/views/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def set_icons(self):
self.profileAddButton.setIcon(get_colored_icon('plus'))
self.profileRenameButton.setIcon(get_colored_icon('edit'))
self.profileExportButton.setIcon(get_colored_icon('file-import-solid'))
self.profileDeleteButton.setIcon(get_colored_icon('trash'))
self.profileDeleteButton.setIcon(get_colored_icon('minus'))
self.miscButton.setIcon(get_colored_icon('settings_wheel'))

def set_progress(self, text=''):
Expand All @@ -156,8 +156,8 @@ def resize_profile_selector(self):
item_height = self.profileSelector.sizeHintForRow(0)
total_height = item_height * self.profileSelector.count() + 2 # 2px pad to prevent scroll bar appearing

if total_height > 350:
self.profileSelector.setFixedHeight(350)
if total_height > 400:
self.profileSelector.setFixedHeight(400)
else:
self.profileSelector.setFixedHeight(total_height)

Expand Down

0 comments on commit cee91aa

Please sign in to comment.