mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-31 17:42:55 +08:00
Fix action toolbar buttons
This commit is contained in:
parent
5bb10b85a0
commit
df5e32009e
@ -66,7 +66,7 @@ Widgets.Pane {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
z: 2
|
z: 2
|
||||||
id: header
|
id: header
|
||||||
height: visible ? 64 : 0
|
height: actionsLayout.implicitHeight + 12
|
||||||
visible: Cpp_UI_Dashboard.actionCount > 0
|
visible: Cpp_UI_Dashboard.actionCount > 0
|
||||||
color: Cpp_ThemeManager.colors["groupbox_background"]
|
color: Cpp_ThemeManager.colors["groupbox_background"]
|
||||||
anchors {
|
anchors {
|
||||||
@ -76,6 +76,7 @@ Widgets.Pane {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
id: actionsLayout
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
@ -90,11 +91,11 @@ Widgets.Pane {
|
|||||||
delegate: Widgets.BigButton {
|
delegate: Widgets.BigButton {
|
||||||
icon.width: 24
|
icon.width: 24
|
||||||
icon.height: 24
|
icon.height: 24
|
||||||
|
toolbarButton: false
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
text: Cpp_UI_Dashboard.actionTitles[index]
|
text: Cpp_UI_Dashboard.actionTitles[index]
|
||||||
icon.source: Cpp_UI_Dashboard.actionIcons[index]
|
icon.source: Cpp_UI_Dashboard.actionIcons[index]
|
||||||
onClicked: Cpp_UI_Dashboard.activateAction(index)
|
onClicked: Cpp_UI_Dashboard.activateAction(index)
|
||||||
palette.buttonText: Cpp_ThemeManager.colors["button_text"]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,9 +101,9 @@ Widgets.Pane {
|
|||||||
//
|
//
|
||||||
Widgets.BigButton {
|
Widgets.BigButton {
|
||||||
iconSize: 24
|
iconSize: 24
|
||||||
|
toolbarButton: false
|
||||||
text: qsTr("Change Icon")
|
text: qsTr("Change Icon")
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
palette.buttonText: Cpp_ThemeManager.colors["button_text"]
|
|
||||||
icon.source: "qrc:/rcc/actions/" + Cpp_JSON_ProjectModel.actionIcon + ".svg"
|
icon.source: "qrc:/rcc/actions/" + Cpp_JSON_ProjectModel.actionIcon + ".svg"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
actionIconPicker.selectedIcon = Cpp_JSON_ProjectModel.actionIcon
|
actionIconPicker.selectedIcon = Cpp_JSON_ProjectModel.actionIcon
|
||||||
@ -123,10 +123,10 @@ Widgets.Pane {
|
|||||||
//
|
//
|
||||||
Widgets.BigButton {
|
Widgets.BigButton {
|
||||||
iconSize: 24
|
iconSize: 24
|
||||||
|
toolbarButton: false
|
||||||
text: qsTr("Duplicate")
|
text: qsTr("Duplicate")
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
onClicked: Cpp_JSON_ProjectModel.duplicateCurrentAction()
|
onClicked: Cpp_JSON_ProjectModel.duplicateCurrentAction()
|
||||||
palette.buttonText: Cpp_ThemeManager.colors["button_text"]
|
|
||||||
icon.source: "qrc:/rcc/icons/project-editor/actions/duplicate.svg"
|
icon.source: "qrc:/rcc/icons/project-editor/actions/duplicate.svg"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,9 +136,9 @@ Widgets.Pane {
|
|||||||
Widgets.BigButton {
|
Widgets.BigButton {
|
||||||
iconSize: 24
|
iconSize: 24
|
||||||
text: qsTr("Delete")
|
text: qsTr("Delete")
|
||||||
|
toolbarButton: false
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
onClicked: Cpp_JSON_ProjectModel.deleteCurrentAction()
|
onClicked: Cpp_JSON_ProjectModel.deleteCurrentAction()
|
||||||
palette.buttonText: Cpp_ThemeManager.colors["button_text"]
|
|
||||||
icon.source: "qrc:/rcc/icons/project-editor/actions/delete.svg"
|
icon.source: "qrc:/rcc/icons/project-editor/actions/delete.svg"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user