From a79abbdb4838ea2a7380519328b388203eb9d70d Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Fri, 4 Nov 2022 13:43:59 +0100 Subject: [PATCH] Fixed hiding of sidebar if Auto Hide Tab is closed --- src/AutoHideSideBar.cpp | 4 +- src/ads.qrc | 1 - src/stylesheets/visual_studio_light.css | 287 ------------------------ 3 files changed, 2 insertions(+), 290 deletions(-) delete mode 100644 src/stylesheets/visual_studio_light.css diff --git a/src/AutoHideSideBar.cpp b/src/AutoHideSideBar.cpp index 066c060..aa1ad1a 100644 --- a/src/AutoHideSideBar.cpp +++ b/src/AutoHideSideBar.cpp @@ -100,11 +100,11 @@ public: /** * Forward event handling to EventHandler */ - /*virtual bool event(QEvent* e) override + virtual bool event(QEvent* e) override { EventHandler->handleViewportEvent(e); return Super::event(e); - }*/ + } }; diff --git a/src/ads.qrc b/src/ads.qrc index 3348820..019f871 100644 --- a/src/ads.qrc +++ b/src/ads.qrc @@ -17,7 +17,6 @@ images/restore-button-focused.svg images/vs-pin-button.svg images/vs-pin-button-pinned.svg - stylesheets/visual_studio_light.css images/vs-pin-button-pinned-focused.svg diff --git a/src/stylesheets/visual_studio_light.css b/src/stylesheets/visual_studio_light.css deleted file mode 100644 index 845c3d6..0000000 --- a/src/stylesheets/visual_studio_light.css +++ /dev/null @@ -1,287 +0,0 @@ - -/* - * Default style sheet on Windows Platforms with focus highlighting flag enabled - */ -ads--CDockManager -{ - background: palette(window); -} - - -ads--CDockContainerWidget { - background: palette(window); - padding: 2px; -} - - -/*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; - background: transparent; - border: none; -} - -ads--CTitleBarButton:hover { - background: rgba(0, 0, 0, 24); -} - -ads--CTitleBarButton:pressed { - background: rgba(0, 0, 0, 48); -} - -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 { - border-bottom: 2px solid palette(highlight); -} - -/*----------------------------------------------------------------------------- - * Styling of auto hide functionality - *---------------------------------------------------------------------------- - */ -ads--CAutoHideTab { - /*background: palette(window);*/ - qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/ -} - - -ads--CAutoHideTab -{ - background: none; - border: none; - padding-left: 2px; - padding-right: 0px; - text-align: center; -} - -ads--CAutoHideTab[sideBarLocation="0"], -ads--CAutoHideTab[sideBarLocation="2"] -{ - border-top: 5px solid rgba(0, 0, 0, 48); - margin-right: 6px; - min-height: 20; -} - - -ads--CAutoHideTab[sideBarLocation="1"], -ads--CAutoHideTab[sideBarLocation="3"] -{ - border-bottom: 5px solid rgba(0, 0, 0, 48); - margin-right: 6px; - min-height: 20; -} - - - -ads--CAutoHideTab:hover[sideBarLocation="0"], -ads--CAutoHideTab:hover[sideBarLocation="2"] -{ - border-top: 5px solid palette(highlight); - color: palette(highlight); -} - - -ads--CAutoHideTab:hover[sideBarLocation="1"], -ads--CAutoHideTab:hover[sideBarLocation="3"] -{ - border-bottom: 5px solid palette(highlight); - color: palette(highlight); -} - -ads--CAutoHideTab[sideBarLocation="0"][activeTab="true"], -ads--CAutoHideTab[sideBarLocation="2"][activeTab="true"] -{ - border-top: 5px solid palette(highlight); -} - - -ads--CAutoHideTab[sideBarLocation="1"][activeTab="true"], -ads--CAutoHideTab[sideBarLocation="3"][activeTab="true"] -{ - border-bottom: 5px solid palette(highlight); -} - - -/* -ads--CAutoHideDockContainer::handle { - background: palette(dark); -} - -ads--CAutoHideDockContainer::handle:vertical { - height: 4px; -} - - -ads--CAutoHideDockContainer::handle:horizontal { - width: 4px; -} -*/ - -/*ads--CAutoHideDockContainer[sideBarLocation="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-focused.svg); - qproperty-iconSize: 16px; -} - -#autoHideTitleLabel -{ - padding-left: 4px; - color: palette(light); -} - -ads--CResizeHandle -{ - /*background: red; - border: 1px solid green;*/ -} - - -ads--CAutoHideDockContainer -{ - background: palette(window); -} - - -ads--CAutoHideDockContainer ads--CDockAreaTitleBar -{ - background: palette(highlight); - border: none; - padding: 0px; -} - -ads--CAutoHideDockContainer #dockAreaCloseButton -{ - qproperty-icon: url(:/ads/images/close-button-focused.svg) -} - - -ads--CAutoHideDockContainer ads--CTitleBarButton:hover -{ - background: rgba(255, 255, 255, 48); -} - -ads--CAutoHideDockContainer ads--CTitleBarButton:pressed -{ - background: rgba(255, 255, 255, 96); -}