Improved visual_studio_light.css

This commit is contained in:
Uwe Kindler 2022-10-25 15:51:38 +02:00
parent 0fbbef7609
commit a74d8acb42
3 changed files with 55 additions and 49 deletions

View File

@ -233,7 +233,6 @@ CAutoHideDockContainer::CAutoHideDockContainer(CDockWidget* DockWidget, CDockWid
//============================================================================
void CAutoHideDockContainer::updateSize()
{
qDebug() << "CAutoHideDockContainer::updateSize()";
auto dockContainerParent = parentContainer();
auto rect = dockContainerParent->contentRect();
@ -485,6 +484,7 @@ void CAutoHideDockContainer::collapseView(bool Enable)
qApp->installEventFilter(this);
}
qDebug() << "CAutoHideDockContainer::collapseView " << Enable;
d->DockWidget->sideTabWidget()->updateStyle();
}
@ -508,22 +508,23 @@ bool CAutoHideDockContainer::eventFilter(QObject* watched, QEvent* event)
}
else if (event->type() == QEvent::MouseButtonPress)
{
// First we check, if the mouse button press is inside the dock manager
auto Container = parentContainer();
// First we check, if the mouse button press is inside the container
// widget. If it is not, i.e. if someone resizes the main window or
// clicks into the application menu or toolbar, then we ignore the
// event
auto widget = qobject_cast<QWidget*>(watched);
bool IsDockManager = false;
bool IsContainer = false;
while (widget)
{
if (widget == d->DockManager)
if (widget == Container)
{
IsDockManager = true;
IsContainer = true;
}
widget = widget->parentWidget();
}
if (!IsDockManager)
if (!IsContainer)
{
return Super::eventFilter(watched, event);
}

View File

@ -92,7 +92,6 @@ CDockWidgetSideTab::CDockWidgetSideTab(CDockWidget* DockWidget, QWidget* parent)
d->DockWidget = DockWidget;
setText(DockWidget->windowTitle());
setFocusPolicy(Qt::NoFocus);
setFlat(true);
}
@ -107,6 +106,7 @@ CDockWidgetSideTab::~CDockWidgetSideTab()
void CDockWidgetSideTab::updateStyle()
{
internal::repolishStyle(this, internal::RepolishDirectChildren);
update();
}

View File

@ -2,14 +2,15 @@
/*
* Default style sheet on Windows Platforms with focus highlighting flag enabled
*/
ads--CDockManager {
padding: 6px;
ads--CDockManager
{
background: palette(window);
}
ads--CDockContainerWidget {
background: palette(window);
padding: 2px;
}
@ -153,57 +154,61 @@ ads--CDockWidgetSideTab {
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
{
background: none;
border: none;
padding-left: 2px;
padding-right: 0px;
text-align: center;
}
ads--CDockWidgetSideTab[sideTabBarArea="0"],
ads--CDockWidgetSideTab[sideTabBarArea="2"]
{
border-top: 5px solid rgba(0, 0, 0, 48);
margin-right: 6px;
min-height: 20;
}
ads--CDockWidgetSideTab[sideTabBarArea="1"] {
/*border-bottom: 1px solid white;*/
ads--CDockWidgetSideTab[sideTabBarArea="1"],
ads--CDockWidgetSideTab[sideTabBarArea="3"]
{
border-bottom: 5px solid rgba(0, 0, 0, 48);
margin-right: 6px;
min-height: 20;
}
ads--CDockWidgetSideTab[sideTabBarArea="2"] {
border-bottom: 1px solid white;
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"],
ads--CDockWidgetSideTab:hover[sideTabBarArea="2"]
{
border-top: 5px solid palette(highlight);
color: palette(highlight);
}
ads--CDockWidgetSideTab[sideTabBarArea="3"] {
border-right: 1px solid white;
ads--CDockWidgetSideTab:hover[sideTabBarArea="1"],
ads--CDockWidgetSideTab:hover[sideTabBarArea="3"]
{
border-bottom: 5px solid palette(highlight);
color: palette(highlight);
}
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"] {
ads--CDockWidgetSideTab[sideTabBarArea="0"][activeTab="true"],
ads--CDockWidgetSideTab[sideTabBarArea="2"][activeTab="true"]
{
border-top: 5px solid palette(highlight);
}
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--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"],
ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"]
{
border-bottom: 5px solid palette(highlight);
}
@ -279,4 +284,4 @@ ads--CAutoHideDockContainer ads--CTitleBarButton:hover
ads--CAutoHideDockContainer ads--CTitleBarButton:pressed
{
background: rgba(255, 255, 255, 96);
}
}