Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwinrules/package/contents/ui/OptionsComboBox.qml
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 83 | MouseArea { | |||
---|---|---|---|---|---|
86 | onClicked: { | 86 | onClicked: { | ||
87 | itemSelection.toggle(); | 87 | itemSelection.toggle(); | ||
88 | itemSelection.toggled(); | 88 | itemSelection.toggled(); | ||
89 | } | 89 | } | ||
90 | } | 90 | } | ||
91 | 91 | | |||
92 | QQC2.ToolTip { | 92 | QQC2.ToolTip { | ||
93 | text: model.tooltip | 93 | text: model.tooltip | ||
94 | visible: hovered && (model.tooltip != "") | 94 | visible: hovered && (model.tooltip.length > 0) | ||
95 | } | 95 | } | ||
96 | 96 | | |||
97 | Component.onCompleted: { | 97 | Component.onCompleted: { | ||
98 | //FIXME: work around bug https://bugs.kde.org/show_bug.cgi?id=403153 | 98 | //FIXME: work around bug https://bugs.kde.org/show_bug.cgi?id=403153 | ||
99 | optionsCombo.popup.width = Math.max(implicitWidth, optionsCombo.width, optionsCombo.popup.width); | 99 | optionsCombo.popup.width = Math.max(implicitWidth, optionsCombo.width, optionsCombo.popup.width); | ||
100 | } | 100 | } | ||
101 | 101 | | |||
102 | onActiveFocusChanged: { | 102 | onActiveFocusChanged: { | ||
103 | if (!activeFocus) { | 103 | if (!activeFocus) { | ||
104 | popup.close(); | 104 | popup.close(); | ||
105 | } | 105 | } | ||
106 | } | 106 | } | ||
107 | } | 107 | } | ||
108 | } | 108 | } |