refs #312 navigation bars, contributes also to #347

* allow to set/unset frameless mode in CDockWidget
* adjusted context menus
* adjusted style sheets
* ini settings for margins
* hidden info area to host floating widgets only visible when floating (allows to CDockInfoArea widgets)
* made some private slots non-virtual
This commit is contained in:
Klaus Basan
2015-04-08 22:46:54 +02:00
parent 425e034b19
commit e7c8c28252
23 changed files with 556 additions and 175 deletions

View File

@@ -1,5 +1,12 @@
[infoarea]
; margins as used in infoarea.cpp
[alias]
; those are the component names and valid until an object name is set
; in most cases the object name is not yet known in the constructor
; this alias makes sense as long there is one object per component
CMainInfoAreaComponent = comp_MainInfoArea
CCockpitInfoAreaComponent = comp_CockpitInfoArea
CInfoBarStatusComponent = dw_dw_InfoBarStatus
[comp_MainInfoArea]
margindocked.left = 1
margindocked.right = 1
margindocked.top = 1
@@ -8,4 +15,41 @@ margindocked.bottom = 1
marginfloating.left = 5
marginfloating.right = 20
marginfloating.top = 5
marginfloating.bottom = 20
marginfloating.bottom = 40
marginfloating.frameless.left = 5
marginfloating.frameless.right = 5
marginfloating.frameless.top = 5
marginfloating.frameless.bottom = 5
[comp_CockpitInfoArea]
margindocked.left = 1
margindocked.right = 1
margindocked.top = 1
margindocked.bottom = 1
marginfloating.left = 5
marginfloating.right = 20
marginfloating.top = 5
marginfloating.bottom = 40
marginfloating.frameless.left = 5
marginfloating.frameless.right = 5
marginfloating.frameless.top = 5
marginfloating.frameless.bottom = 5
[dw_InfoBarStatus]
margindocked.left = 0
margindocked.right = 0
margindocked.top = 0
margindocked.bottom = 0
marginfloating.left = 0
marginfloating.right = 0
marginfloating.top = 0
marginfloating.bottom = 0
marginfloating.frameless.left = 0
marginfloating.frameless.right = 0
marginfloating.frameless.top = 0
marginfloating.frameless.bottom = 0

View File

@@ -1,14 +1,13 @@
/** style is applied to a CDockWidgetInfoBar **/
/** frameless is dynamic property**/
/** for frameless only use QDockWidget[frameless="true"] QFrame **/
QFrame {
margin: 0px;
padding-left: 6px;
padding-right: 6px;
padding-bottom: 0px;
}
/** frameless is dynamic property**/
/** for frameless only use QDockWidget[frameless="true"] QFrame **/
QDockWidget QFrame
{
padding-top: 0px;
background-color: darkslategray;
background-image: url(:/textures/icons/textures/texture-outer.jpg);
border: 0px;

View File

@@ -19,25 +19,29 @@ QMainWindow {
/** required when dock widget is floating **/
/** background-image not working on QDockWidget, so I use direct children **/
#sw_MainMiddle BlackGui--CDockWidgetInfoArea {
BlackGui--CDockWidgetInfoArea[frameless="false"] {
background-color: black;
}
BlackGui--CDockWidgetInfoArea[frameless="true"] {
background-color: white;
}
/** this is the first widget in the dock area **/
/** all dock widgets shall have this QWidget as container **/
#sw_MainMiddle BlackGui--CDockWidgetInfoArea > QWidget {
BlackGui--CDockWidgetInfoArea > QWidget {
background-color: black;
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
/** the following QFrame, likely the component itself
#sw_MainMiddle BlackGui--CDockWidgetInfoArea > QWidget > QFrame {
border: 0px;
padding: 0px;
BlackGui--CDockWidgetInfoArea > QWidget > QFrame {
border: 0px;
padding: 0px;
}
/** fix the menu, which is overridden by the above QWidget **/
#sw_MainMiddle BlackGui--CDockWidgetInfoArea > QMenu {
BlackGui--CDockWidgetInfoArea > QMenu {
border: 1px solid darkslategray; /* reserve space for selection border */
background: lightgray;
color: black;
@@ -74,7 +78,10 @@ QAbstractScrollArea #pg_StatusPageConsole { background-color: black; }
/** dw_InfoBarStatus has its own style sheet **/
#fr_CentralFrameInside {
margin: 5px;
margin-right: 5px;
margin-left: 5px;
margin-top: 2px;
margin-bottom: 5px;
}
#gb_AtcStationsOnlineInfo {