RibbonTitleBar: Add show_pin_btn property.

This commit is contained in:
Mentalflow 2024-04-05 01:41:42 +08:00
parent b48cbe6719
commit 453a15b37f
Signed by: Mentalflow
GPG Key ID: 5AE68D4401A2EE71
1 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,7 @@ Item {
property string title: Window.window.title property string title: Window.window.title
property bool show_style_switch: true property bool show_style_switch: true
property bool show_darkmode_btn: true property bool show_darkmode_btn: true
property bool show_pin_btn: true
property bool dark_mode: RibbonTheme.dark_mode property bool dark_mode: RibbonTheme.dark_mode
property bool modern_style: RibbonTheme.modern_style property bool modern_style: RibbonTheme.modern_style
property string title_color: modern_style ? Qt.platform.os === "windows" ? dark_mode ? "#141414" : "#F5F5F5" :"transparent" : dark_mode ? "#282828" : "#2C59B7" property string title_color: modern_style ? Qt.platform.os === "windows" ? dark_mode ? "#141414" : "#F5F5F5" :"transparent" : dark_mode ? "#282828" : "#2C59B7"
@ -167,6 +168,7 @@ Item {
text_color_reverse: false text_color_reverse: false
tip_text: qsTr("Stay on Top") tip_text: qsTr("Stay on Top")
onClicked: Window.window.flags ^= Qt.WindowStaysOnTopHint onClicked: Window.window.flags ^= Qt.WindowStaysOnTopHint
visible: control.show_pin_btn
} }
} }
} }