Improved visual_studio_light.css

This commit is contained in:
Uwe Kindler 2022-10-25 09:11:10 +02:00
parent ff0b32a8e0
commit 8e8ead0b4f
5 changed files with 257 additions and 13 deletions

View File

@ -46,16 +46,16 @@ int main(int argc, char *argv[])
a.setApplicationName("Advanced Docking System Demo");
a.setQuitOnLastWindowClosed(true);
QFile StyleSheetFile(":/adsdemo/app.css");
StyleSheetFile.open(QIODevice::ReadOnly);
QTextStream StyleSheetStream(&StyleSheetFile);
a.setStyleSheet(StyleSheetStream.readAll());
StyleSheetFile.close();
qInstallMessageHandler(myMessageOutput);
qDebug() << "Message handler test";
CMainWindow mw;
mw.show();
QFile StyleSheetFile(":/adsdemo/app.css");
StyleSheetFile.open(QIODevice::ReadOnly);
QTextStream StyleSheetStream(&StyleSheetFile);
a.setStyleSheet(StyleSheetStream.readAll());
StyleSheetFile.close();
return a.exec();
}

View File

@ -5,6 +5,8 @@
#include <QLabel>
#include <QPushButton>
using namespace ads;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)

View File

@ -191,8 +191,9 @@ void DockManagerPrivate::loadStylesheet()
initResource();
QString Result;
QString FileName = ":ads/stylesheets/";
FileName += CDockManager::testConfigFlag(CDockManager::FocusHighlighting)
? "visual_studio_light" : "default";
FileName += "visual_studio_light";
/*FileName += CDockManager::testConfigFlag(CDockManager::FocusHighlighting)
? "focus_highlighting" : "default";*/
#ifdef Q_OS_LINUX
FileName += "_linux";
#endif

View File

@ -57,11 +57,6 @@ QScrollArea#dockWidgetScrollArea {
border: none;
}
#dockAreaAutoHideButton {
qproperty-icon: url(:/ads/images/vs-pin-button.svg);
qproperty-iconSize: 16px;
}
#tabCloseButton {
margin-top: 2px;
@ -188,6 +183,11 @@ ads--CAutoHideDockContainer::handle:horizontal {
}*/
#dockAreaAutoHideButton {
qproperty-icon: url(:/ads/images/vs-pin-button.svg);
qproperty-iconSize: 16px;
}
ads--CAutoHideDockContainer #dockAreaAutoHideButton
{
qproperty-icon: url(:/ads/images/vs-pin-button-pinned.svg);

View File

@ -0,0 +1,241 @@
/*
* Default style sheet on Windows Platforms with focus highlighting flag enabled
*/
ads--CDockManager {
padding: 6px;
background: palette(window);
}
ads--CDockContainerWidget {
background: palette(window);
}
/*ads--CDockContainerWidget > QSplitter{
padding: 1 0 1 0;
}*/
ads--CDockAreaWidget {
background: palette(window);
/*border: 1px solid palette(dark);*/
}
ads--CDockWidgetTab {
background: palette(window);
border: none;
padding: 0 0px;
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
}
ads--CDockWidgetTab[activeTab="true"] {
background: rgb(204, 204, 204);
}
ads--CDockWidgetTab QLabel {
color: palette(foreground);
}
ads--CDockWidgetTab[activeTab="true"] QLabel {
color: palette(foreground);
}
ads--CDockWidget {
background: palette(light);
/*border-color: palette(dark);
border-style: solid;
border-width: 1px 0 0 0;*/
border: 1px solid rgb(204, 204, 204);
border-top: none;
}
ads--CTitleBarButton {
padding: 0px 0px;
}
QScrollArea#dockWidgetScrollArea {
padding: 0px;
border: none;
}
#tabsMenuButton::menu-indicator {
image: none;
}
#tabCloseButton {
margin-top: 2px;
background: none;
border: none;
padding: 0px -2px;
qproperty-icon: url(:/ads/images/close-button.svg),
url(:/ads/images/close-button-disabled.svg) disabled;
qproperty-iconSize: 16px;
}
#tabCloseButton:hover {
/*border: 1px solid rgba(0, 0, 0, 32);*/
background: rgba(0, 0, 0, 24);
}
#tabCloseButton:pressed {
background: rgba(0, 0, 0, 48);
}
#dockAreaCloseButton {
qproperty-icon: url(:/ads/images/close-button.svg),
url(:/ads/images/close-button-disabled.svg) disabled;
qproperty-iconSize: 16px;
}
#detachGroupButton {
qproperty-icon: url(:/ads/images/detach-button.svg),
url(:/ads/images/detach-button-disabled.svg) disabled;
qproperty-iconSize: 16px;
}
ads--CDockSplitter::handle {
/*background-color: palette(dark);*/
/* uncomment the following line if you would like to change the size of
the splitter handles */
/* height: 1px; */
}
/* Focus related styling */
ads--CDockWidgetTab[focused="true"] {
background: palette(highlight);
border-color: palette(highlight);
}
ads--CDockWidgetTab[focused="true"]>#tabCloseButton {
qproperty-icon: url(:/ads/images/close-button-focused.svg)
}
ads--CDockWidgetTab[focused="true"]>#tabCloseButton:hover {
background: rgba(255, 255, 255, 48);
}
ads--CDockWidgetTab[focused="true"]>#tabCloseButton:pressed {
background: rgba(255, 255, 255, 92);
}
ads--CDockWidgetTab[focused="true"] QLabel {
color: palette(light);
}
ads--CDockAreaTitleBar {
background: transparent;
border-bottom: 2px solid rgb(204, 204, 204);
padding-bottom: 0px;
}
ads--CDockAreaWidget[focused="true"] ads--CDockAreaTitleBar {
background: transparent;
border-bottom: 2px solid palette(highlight);
padding-bottom: 0px;
}
/*-----------------------------------------------------------------------------
* Styling of auto hide functionality
*----------------------------------------------------------------------------
*/
ads--CDockWidgetSideTab {
/*background: palette(window);*/
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
}
ads--CDockWidgetSideTab[sideTabBarArea="0"] {
/*border-right: 1px solid white;*/
}
ads--CDockWidgetSideTab[sideTabBarArea="1"] {
/*border-bottom: 1px solid white;*/
}
ads--CDockWidgetSideTab[sideTabBarArea="2"] {
border-bottom: 1px solid white;
}
ads--CDockWidgetSideTab[sideTabBarArea="3"] {
border-right: 1px solid white;
}
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"] {
}
ads--CDockWidgetSideTab:hover[sideTabBarArea="1"] {
}
ads--CDockWidgetSideTab:hover[sideTabBarArea="2"] {
}
ads--CDockWidgetSideTab:hover[sideTabBarArea="3"] {
}
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"][activeTab="true"] {
}
ads--CDockWidgetSideTab[sideTabBarArea="0"][activeTab="true"] {
}
ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"] {
}
ads--CDockWidgetSideTab[sideTabBarArea="2"][activeTab="true"] {
}
ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"] {
}
/*
ads--CAutoHideDockContainer::handle {
background: palette(dark);
}
ads--CAutoHideDockContainer::handle:vertical {
height: 4px;
}
ads--CAutoHideDockContainer::handle:horizontal {
width: 4px;
}
*/
/*ads--CAutoHideDockContainer[sideTabBarArea="0"]:handle {
border: 1px solid palette(dark);
background: white;
}*/
#dockAreaAutoHideButton {
qproperty-icon: url(:/ads/images/vs-pin-button.svg);
qproperty-iconSize: 16px;
}
ads--CAutoHideDockContainer #dockAreaAutoHideButton
{
qproperty-icon: url(:/ads/images/vs-pin-button-pinned.svg);
qproperty-iconSize: 16px;
}
#autoHideTitleLabel {
padding-left: 4px;
}
ads--CResizeHandle
{
background: red;
border: 1px solid green;
}