Make clickable dyndeck labels fixed in size

This commit is contained in:
RumovZ 2021-03-01 11:26:52 +01:00
parent f764753920
commit e29bd4479b
2 changed files with 63 additions and 44 deletions

View file

@ -76,8 +76,8 @@ class DeckConf(QDialog):
self.setStyleSheet(
f"""QPushButton[label] {{ padding: 0; border: 0 }}
QPushButton[label]:hover {{ text-decoration: underline }}
QPushButton[label="search"] {{ text-align: left; color: {blue} }}
QPushButton[label="hint"] {{ text-align: right; color: {grey} }}"""
QPushButton[label="search"] {{ color: {blue} }}
QPushButton[label="hint"] {{ color: {grey} }}"""
)
disable_help_button(self)
self.setWindowModality(Qt.WindowModal)

View file

@ -22,12 +22,18 @@
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>ACTIONS_NAME</string>
</property>
</widget>
</item>
<item row="0" column="2">
<item row="0" column="1">
<widget class="QLineEdit" name="name">
<property name="text">
<string/>
@ -37,22 +43,6 @@
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@ -64,6 +54,12 @@
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QPushButton" name="search_button">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
@ -129,8 +125,17 @@
<string>DECKS_FILTER_2</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1" colspan="4">
<widget class="QLineEdit" name="search_2"/>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="search_button_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
@ -151,8 +156,8 @@
</property>
</widget>
</item>
<item row="0" column="1" colspan="4">
<widget class="QLineEdit" name="search_2"/>
<item row="1" column="3" colspan="2">
<widget class="QComboBox" name="order_2"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_6">
@ -177,9 +182,6 @@
</property>
</widget>
</item>
<item row="1" column="3" colspan="2">
<widget class="QComboBox" name="order_2"/>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_4">
<property name="text">
@ -257,26 +259,43 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="hint_button">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>SEARCH_VIEW_IN_BROWSER</string>
</property>
<property name="text">
<string>DECKS_UNMOVABLE_CARDS</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
<property name="label" stdset="0">
<string notr="true">hint</string>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="hint_button">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>SEARCH_VIEW_IN_BROWSER</string>
</property>
<property name="text">
<string>DECKS_UNMOVABLE_CARDS</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
<property name="label" stdset="0">
<string notr="true">hint</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">