mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
refs #312, Navigator (aka navigation bars)
* different dyn. property names for main window, dock window and infoarea * dyn.properties for nested QWidgets * style sheet for navigator * utility function to delete layout * added standard OS icons, some formatting in CICons * actions in main window to be used in navigator * main window becomes normal window when minimized so it is correctly displayed in Win taskbar Remark: Frameless floating dockwidgets with rounded borders not yet working
This commit is contained in:
@@ -4,39 +4,59 @@
|
||||
; this alias makes sense as long there is one object per component
|
||||
CMainInfoAreaComponent = comp_MainInfoArea
|
||||
CCockpitInfoAreaComponent = comp_CockpitInfoArea
|
||||
CInvisibleInfoAreaComponent = comp_InvisibleInfoArea
|
||||
CInfoBarStatusComponent = dw_dw_InfoBarStatus
|
||||
|
||||
[comp_MainInfoArea]
|
||||
margindocked.left = 1
|
||||
margindocked.right = 1
|
||||
margindocked.top = 1
|
||||
margindocked.bottom = 1
|
||||
margindocked.left = 0
|
||||
margindocked.right = 0
|
||||
margindocked.top = 0
|
||||
margindocked.bottom = 0
|
||||
|
||||
marginfloating.left = 5
|
||||
marginfloating.right = 20
|
||||
marginfloating.top = 5
|
||||
marginfloating.bottom = 40
|
||||
; why the odd numbers??
|
||||
marginfloating.left = 0
|
||||
marginfloating.right = 15
|
||||
marginfloating.top = 0
|
||||
marginfloating.bottom = 35
|
||||
|
||||
marginfloating.frameless.left = 5
|
||||
marginfloating.frameless.right = 5
|
||||
marginfloating.frameless.top = 5
|
||||
marginfloating.frameless.bottom = 5
|
||||
marginfloating.frameless.left = 0
|
||||
marginfloating.frameless.right = 0
|
||||
marginfloating.frameless.top = 0
|
||||
marginfloating.frameless.bottom = 0
|
||||
|
||||
[comp_CockpitInfoArea]
|
||||
margindocked.left = 1
|
||||
margindocked.right = 1
|
||||
margindocked.top = 1
|
||||
margindocked.bottom = 1
|
||||
margindocked.left = 0
|
||||
margindocked.right = 0
|
||||
margindocked.top = 0
|
||||
margindocked.bottom = 0
|
||||
|
||||
marginfloating.left = 5
|
||||
marginfloating.right = 20
|
||||
marginfloating.top = 5
|
||||
marginfloating.bottom = 40
|
||||
; why the odd numbers??
|
||||
marginfloating.left = 0
|
||||
marginfloating.right = 15
|
||||
marginfloating.top = 0
|
||||
marginfloating.bottom = 35
|
||||
|
||||
marginfloating.frameless.left = 5
|
||||
marginfloating.frameless.right = 5
|
||||
marginfloating.frameless.top = 5
|
||||
marginfloating.frameless.bottom = 5
|
||||
marginfloating.frameless.left = 0
|
||||
marginfloating.frameless.right = 0
|
||||
marginfloating.frameless.top = 0
|
||||
marginfloating.frameless.bottom = 0
|
||||
|
||||
[comp_InvisibleInfoArea]
|
||||
margindocked.left = 0
|
||||
margindocked.right = 0
|
||||
margindocked.top = 0
|
||||
margindocked.bottom = 0
|
||||
|
||||
; why the odd numbers??
|
||||
marginfloating.left = 0
|
||||
marginfloating.right = 15
|
||||
marginfloating.top = 0
|
||||
marginfloating.bottom = 35
|
||||
|
||||
marginfloating.frameless.left = 0
|
||||
marginfloating.frameless.right = 0
|
||||
marginfloating.frameless.top = 0
|
||||
marginfloating.frameless.bottom = 0
|
||||
|
||||
[dw_InfoBarStatus]
|
||||
margindocked.left = 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** style is applied to a CDockWidgetInfoBar **/
|
||||
/** frameless is dynamic property**/
|
||||
/** for frameless only use QDockWidget[frameless="true"] QFrame **/
|
||||
/** for frameless only use QDockWidget[framelessDockWidget="true"] QFrame **/
|
||||
|
||||
QFrame {
|
||||
margin: 0px;
|
||||
|
||||
@@ -8,7 +8,7 @@ Remarks:
|
||||
2) use -- instead of :: for namespaces
|
||||
|
||||
Used dynamic properties
|
||||
frameless (infobar.qss , here)
|
||||
framelessMainWindow (infobar.qss , here)
|
||||
**/
|
||||
|
||||
/** Main window **/
|
||||
@@ -17,14 +17,26 @@ QMainWindow {
|
||||
background-color: darkslategray;
|
||||
}
|
||||
|
||||
/** required when dock widget is floating **/
|
||||
/** background-image not working on QDockWidget, so I use direct children **/
|
||||
BlackGui--CDockWidgetInfoArea[frameless="false"] {
|
||||
background-color: black;
|
||||
/** separator between info areas and rest **/
|
||||
/** this hides them **/
|
||||
QMainWindow::separator {
|
||||
background: transparent;
|
||||
width: 0px; /* when vertical */
|
||||
height: 0px; /* when horizontal */
|
||||
}
|
||||
|
||||
BlackGui--CDockWidgetInfoArea[frameless="true"] {
|
||||
background-color: white;
|
||||
QMainWindow::separator:hover {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
Required when dock widget is floating
|
||||
1) background-image not working on QDockWidget, so I use direct children for that
|
||||
2) seems to have only effect as normal (floating) window
|
||||
3) Borders between this widget and the inner child is the margin in gui.ini
|
||||
**/
|
||||
BlackGui--CDockWidgetInfoArea {
|
||||
background-color: green; /** I use green here so I can adjust the borders in gui.ini **/
|
||||
}
|
||||
|
||||
/** this is the first widget in the dock area **/
|
||||
@@ -62,12 +74,12 @@ QAbstractScrollArea #qw_RemarksGenerator { background-color: transparent; backg
|
||||
|
||||
/** in log component **/
|
||||
QAbstractScrollArea #pg_StatusPageMessages { background-color: black; }
|
||||
QAbstractScrollArea #pg_StatusPageConsole { background-color: black; }
|
||||
QAbstractScrollArea #pg_StatusPageCons ole { background-color: black; }
|
||||
|
||||
/** main GUI parts **/
|
||||
|
||||
/** style when main window is frameless **/
|
||||
#wi_CentralWidgetOutside[frameless="true"] {
|
||||
#wi_CentralWidgetOutside[framelessMainWindow="true"] {
|
||||
background-image: url(:/textures/icons/textures/texture-outer.jpg);
|
||||
background-color: darkslategray;
|
||||
margin: 0px;
|
||||
|
||||
9
src/blackgui/qss/navigator.qss
Normal file
9
src/blackgui/qss/navigator.qss
Normal file
@@ -0,0 +1,9 @@
|
||||
#fr_NavigatorDockWidgetInner[framelessDockWidget="true"] {
|
||||
margin: 0px;
|
||||
border: 2px solid green;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#fr_NavigatorDockWidgetInner QToolButton {
|
||||
margin: 0px;
|
||||
}
|
||||
Reference in New Issue
Block a user