UI: ApplicationsPage: Tweak group buttons.

This commit is contained in:
Nodir Temirkhodjaev 2017-12-22 16:28:34 +05:00
parent 1534fd6217
commit c1adc15edb
5 changed files with 36 additions and 14 deletions

View File

@ -3,6 +3,7 @@
<file>qml/controls/ButtonMenu.qml</file> <file>qml/controls/ButtonMenu.qml</file>
<file>qml/controls/ButtonPopup.qml</file> <file>qml/controls/ButtonPopup.qml</file>
<file>qml/controls/LinkButton.qml</file> <file>qml/controls/LinkButton.qml</file>
<file>qml/controls/RoundButtonTip.qml</file>
<file>qml/controls/ScrollBarControl.qml</file> <file>qml/controls/ScrollBarControl.qml</file>
<file>qml/controls/SpinCombo.qml</file> <file>qml/controls/SpinCombo.qml</file>
<file>qml/controls/SpinComboRow.qml</file> <file>qml/controls/SpinComboRow.qml</file>

View File

@ -5,7 +5,7 @@ Label {
id: bt id: bt
opacity: enabled ? 1.0 : 0.45 opacity: enabled ? 1.0 : 0.45
color: checked ? "darkblue" : (mouseover ? "purple" : "blue") color: checked ? "darkblue" : (hovered ? "purple" : "blue")
font.underline: true font.underline: true
@ -17,7 +17,7 @@ Label {
property bool pressed: ma.pressed && ma.containsMouse property bool pressed: ma.pressed && ma.containsMouse
readonly property bool checked: selected || pressed readonly property bool checked: selected || pressed
readonly property alias mouseover: ma.containsMouse readonly property alias hovered: ma.containsMouse
MouseArea { MouseArea {
id: ma id: ma

View File

@ -0,0 +1,16 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
RoundButton {
id: bt
hoverEnabled: true
property alias tipText: toolTip.text
ToolTip {
id: toolTip
visible: bt.hovered
delay: 500
timeout: 5000
}
}

View File

@ -71,10 +71,10 @@ BasePage {
&& qsTranslate("qml", "Add Group") && qsTranslate("qml", "Add Group")
onClicked: addAppGroup() onClicked: addAppGroup()
} }
Button { RoundButtonTip {
enabled: editGroupName.text && appsColumn.enabled enabled: editGroupName.text && appsColumn.enabled
icon.source: "qrc:/images/application_edit.png" icon.source: "qrc:/images/application_edit.png"
text: translationManager.dummyBool tipText: translationManager.dummyBool
&& qsTranslate("qml", "Rename Group") && qsTranslate("qml", "Rename Group")
onClicked: renameAppGroup() onClicked: renameAppGroup()
} }

View File

@ -1,6 +1,7 @@
import QtQuick 2.9 import QtQuick 2.9
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../../controls"
import com.fortfirewall 1.0 import com.fortfirewall 1.0
ColumnLayout { ColumnLayout {
@ -9,25 +10,29 @@ ColumnLayout {
property AppGroup appGroup property AppGroup appGroup
RowLayout { RowLayout {
Button { RoundButtonTip {
icon.source: "qrc:/images/application_delete.png" icon.source: "qrc:/images/application_delete.png"
text: translationManager.dummyBool tipText: translationManager.dummyBool
&& qsTranslate("qml", "Remove Group") && qsTranslate("qml", "Remove Group")
onClicked: removeAppGroup(index) onClicked: removeAppGroup(index)
} }
Button { RoundButtonTip {
icon.source: "qrc:/images/resultset_previous.png" icon.source: "qrc:/images/resultset_previous.png"
text: translationManager.dummyBool tipText: translationManager.dummyBool
&& qsTranslate("qml", "Move left") && qsTranslate("qml", "Move left")
onClicked: moveAppGroup(index, -1) onClicked: moveAppGroup(index, -1)
} }
Button { RoundButtonTip {
icon.source: "qrc:/images/resultset_next.png" icon.source: "qrc:/images/resultset_next.png"
text: translationManager.dummyBool tipText: translationManager.dummyBool
&& qsTranslate("qml", "Move right") && qsTranslate("qml", "Move right")
onClicked: moveAppGroup(index, 1) onClicked: moveAppGroup(index, 1)
} }
Item {
Layout.preferredWidth: 10
}
SpeedLimitButton {} SpeedLimitButton {}
Item { Item {