mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-15 05:22:53 +08:00
Ensure that titlebar & window controls are visible when using the WM decorates the dialogs
This commit is contained in:
parent
ca47886e95
commit
7efadca2cd
@ -72,11 +72,11 @@ Item {
|
|||||||
minimumWidth: 640 + shadowMargin
|
minimumWidth: 640 + shadowMargin
|
||||||
minimumHeight: 480 + shadowMargin
|
minimumHeight: 480 + shadowMargin
|
||||||
title: externalWidget.widgetTitle
|
title: externalWidget.widgetTitle
|
||||||
extraFlags: Qt.WindowStaysOnTopHint
|
|
||||||
titlebarText: Cpp_ThemeManager.text
|
titlebarText: Cpp_ThemeManager.text
|
||||||
titlebarColor: Cpp_ThemeManager.widgetWindowBackground
|
titlebarColor: Cpp_ThemeManager.widgetWindowBackground
|
||||||
backgroundColor: Cpp_ThemeManager.widgetWindowBackground
|
backgroundColor: Cpp_ThemeManager.widgetWindowBackground
|
||||||
borderColor: isMaximized ? backgroundColor : Cpp_ThemeManager.highlight
|
borderColor: isMaximized ? backgroundColor : Cpp_ThemeManager.highlight
|
||||||
|
extraFlags: Qt.WindowStaysOnTopHint | Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: timer
|
id: timer
|
||||||
|
@ -49,6 +49,10 @@ QtWindow.Window {
|
|||||||
root.flags = root.customFlags | root.extraFlags
|
root.flags = root.customFlags | root.extraFlags
|
||||||
else
|
else
|
||||||
root.flags = Qt.Window | root.extraFlags
|
root.flags = Qt.Window | root.extraFlags
|
||||||
|
|
||||||
|
var prevVisible = root.visible
|
||||||
|
root.visible = false
|
||||||
|
root.visible = prevVisible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,14 +65,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Remove selection
|
|
||||||
//
|
|
||||||
Shortcut {
|
|
||||||
sequence: "escape"
|
|
||||||
onActivated: textEdit.clearSelection()
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Window shadow (must go before window declaration
|
// Window shadow (must go before window declaration
|
||||||
// to avoid blurry artifacts & glitches).
|
// to avoid blurry artifacts & glitches).
|
||||||
|
@ -41,11 +41,11 @@ FramelessWindow.CustomWindow {
|
|||||||
title: qsTr("About")
|
title: qsTr("About")
|
||||||
width: minimumWidth
|
width: minimumWidth
|
||||||
height: minimumHeight
|
height: minimumHeight
|
||||||
extraFlags: Qt.WindowStaysOnTopHint
|
|
||||||
x: (Screen.desktopAvailableWidth - width) / 2
|
x: (Screen.desktopAvailableWidth - width) / 2
|
||||||
y: (Screen.desktopAvailableHeight - height) / 2
|
y: (Screen.desktopAvailableHeight - height) / 2
|
||||||
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
|
extraFlags: Qt.WindowStaysOnTopHint | Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||||
minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
|
|
||||||
|
@ -38,7 +38,6 @@ FramelessWindow.CustomWindow {
|
|||||||
minimizeEnabled: false
|
minimizeEnabled: false
|
||||||
maximizeEnabled: false
|
maximizeEnabled: false
|
||||||
title: qsTr("Acknowledgements")
|
title: qsTr("Acknowledgements")
|
||||||
extraFlags: Qt.WindowStaysOnTopHint
|
|
||||||
titlebarText: Cpp_ThemeManager.text
|
titlebarText: Cpp_ThemeManager.text
|
||||||
x: (Screen.desktopAvailableWidth - width) / 2
|
x: (Screen.desktopAvailableWidth - width) / 2
|
||||||
y: (Screen.desktopAvailableHeight - height) / 2
|
y: (Screen.desktopAvailableHeight - height) / 2
|
||||||
@ -46,6 +45,7 @@ FramelessWindow.CustomWindow {
|
|||||||
backgroundColor: Cpp_ThemeManager.dialogBackground
|
backgroundColor: Cpp_ThemeManager.dialogBackground
|
||||||
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
|
extraFlags: Qt.WindowStaysOnTopHint | Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||||
minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
|
|
||||||
|
@ -38,7 +38,6 @@ FramelessWindow.CustomWindow {
|
|||||||
minimizeEnabled: false
|
minimizeEnabled: false
|
||||||
maximizeEnabled: false
|
maximizeEnabled: false
|
||||||
title: qsTr("CSV Player")
|
title: qsTr("CSV Player")
|
||||||
extraFlags: Qt.WindowStaysOnTopHint
|
|
||||||
titlebarText: Cpp_ThemeManager.text
|
titlebarText: Cpp_ThemeManager.text
|
||||||
x: (Screen.desktopAvailableWidth - width) / 2
|
x: (Screen.desktopAvailableWidth - width) / 2
|
||||||
y: (Screen.desktopAvailableHeight - height) / 2
|
y: (Screen.desktopAvailableHeight - height) / 2
|
||||||
@ -46,6 +45,7 @@ FramelessWindow.CustomWindow {
|
|||||||
backgroundColor: Cpp_ThemeManager.dialogBackground
|
backgroundColor: Cpp_ThemeManager.dialogBackground
|
||||||
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
|
extraFlags: Qt.WindowStaysOnTopHint | Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||||
minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ FramelessWindow.CustomWindow {
|
|||||||
height: minimumHeight
|
height: minimumHeight
|
||||||
minimizeEnabled: false
|
minimizeEnabled: false
|
||||||
maximizeEnabled: false
|
maximizeEnabled: false
|
||||||
extraFlags: Qt.WindowStaysOnTopHint
|
|
||||||
titlebarText: Cpp_ThemeManager.text
|
titlebarText: Cpp_ThemeManager.text
|
||||||
x: (Screen.desktopAvailableWidth - width) / 2
|
x: (Screen.desktopAvailableWidth - width) / 2
|
||||||
y: (Screen.desktopAvailableHeight - height) / 2
|
y: (Screen.desktopAvailableHeight - height) / 2
|
||||||
@ -47,6 +46,7 @@ FramelessWindow.CustomWindow {
|
|||||||
backgroundColor: Cpp_ThemeManager.dialogBackground
|
backgroundColor: Cpp_ThemeManager.dialogBackground
|
||||||
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
|
extraFlags: Qt.WindowStaysOnTopHint | Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||||
minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
|
|
||||||
|
@ -43,11 +43,11 @@ FramelessWindow.CustomWindow {
|
|||||||
width: minimumWidth
|
width: minimumWidth
|
||||||
height: minimumHeight
|
height: minimumHeight
|
||||||
title: qsTr("MQTT Configuration")
|
title: qsTr("MQTT Configuration")
|
||||||
extraFlags: Qt.WindowStaysOnTopHint
|
|
||||||
x: (Screen.desktopAvailableWidth - width) / 2
|
x: (Screen.desktopAvailableWidth - width) / 2
|
||||||
y: (Screen.desktopAvailableHeight - height) / 2
|
y: (Screen.desktopAvailableHeight - height) / 2
|
||||||
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
|
extraFlags: Qt.WindowStaysOnTopHint | Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||||
minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name":"Mainframe",
|
"name":"Midnight",
|
||||||
"author":"Alex Spataru",
|
"author":"Alex Spataru",
|
||||||
"titlebarSeparator":false,
|
"titlebarSeparator":false,
|
||||||
"colors":{
|
"colors":{
|
||||||
@ -41,26 +41,24 @@
|
|||||||
"connectButtonChecked":"#fc5142",
|
"connectButtonChecked":"#fc5142",
|
||||||
"connectButtonUnchecked":"#2eed5c",
|
"connectButtonUnchecked":"#2eed5c",
|
||||||
"mqttButton":"#eda870",
|
"mqttButton":"#eda870",
|
||||||
"widgetTextPrimary":"#24476a",
|
"widgetTextPrimary":"#f1bd92",
|
||||||
"widgetTextSecondary":"#666666",
|
"widgetTextSecondary":"#517497",
|
||||||
"widgetWindowBackground":"#484f62",
|
"widgetWindowBackground":"#484f62",
|
||||||
"widgetWindowBorder":"#b7878d",
|
"widgetWindowBorder":"#b7878d",
|
||||||
"widgetForegroundPrimary":"#f94144",
|
"widgetForegroundPrimary":"#f1bd92",
|
||||||
"widgetForegroundSecondary":"#666666",
|
"widgetForegroundSecondary":"#517497",
|
||||||
"widgetIndicator":"#444444",
|
"widgetIndicator":"#ffffff",
|
||||||
"widgetControlBackground":"#666666",
|
|
||||||
"widgetColors":[
|
"widgetColors":[
|
||||||
"#1f76b4",
|
"#fa8174",
|
||||||
"#ff7f0f",
|
"#bfbbd9",
|
||||||
"#2aa02b",
|
"#80b1d2",
|
||||||
"#d62628",
|
"#fdffb4",
|
||||||
"#9467bd",
|
"#fdb462",
|
||||||
"#8c564c",
|
"#8dd3c7",
|
||||||
"#e377c1",
|
"#b3dd69",
|
||||||
"#7f7f7f",
|
"#feed6f",
|
||||||
"#bcbd21",
|
"#bc81bc",
|
||||||
"#19bdcf",
|
"#cceac4"
|
||||||
"#1955fe"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user