mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-13 00:30:25 +08:00
Improved visual_studio_light.css
This commit is contained in:
parent
0fbbef7609
commit
a74d8acb42
@ -233,7 +233,6 @@ CAutoHideDockContainer::CAutoHideDockContainer(CDockWidget* DockWidget, CDockWid
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
void CAutoHideDockContainer::updateSize()
|
void CAutoHideDockContainer::updateSize()
|
||||||
{
|
{
|
||||||
qDebug() << "CAutoHideDockContainer::updateSize()";
|
|
||||||
auto dockContainerParent = parentContainer();
|
auto dockContainerParent = parentContainer();
|
||||||
auto rect = dockContainerParent->contentRect();
|
auto rect = dockContainerParent->contentRect();
|
||||||
|
|
||||||
@ -485,6 +484,7 @@ void CAutoHideDockContainer::collapseView(bool Enable)
|
|||||||
qApp->installEventFilter(this);
|
qApp->installEventFilter(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDebug() << "CAutoHideDockContainer::collapseView " << Enable;
|
||||||
d->DockWidget->sideTabWidget()->updateStyle();
|
d->DockWidget->sideTabWidget()->updateStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -508,22 +508,23 @@ bool CAutoHideDockContainer::eventFilter(QObject* watched, QEvent* event)
|
|||||||
}
|
}
|
||||||
else if (event->type() == QEvent::MouseButtonPress)
|
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
|
// 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
|
// clicks into the application menu or toolbar, then we ignore the
|
||||||
// event
|
// event
|
||||||
auto widget = qobject_cast<QWidget*>(watched);
|
auto widget = qobject_cast<QWidget*>(watched);
|
||||||
bool IsDockManager = false;
|
bool IsContainer = false;
|
||||||
while (widget)
|
while (widget)
|
||||||
{
|
{
|
||||||
if (widget == d->DockManager)
|
if (widget == Container)
|
||||||
{
|
{
|
||||||
IsDockManager = true;
|
IsContainer = true;
|
||||||
}
|
}
|
||||||
widget = widget->parentWidget();
|
widget = widget->parentWidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsDockManager)
|
if (!IsContainer)
|
||||||
{
|
{
|
||||||
return Super::eventFilter(watched, event);
|
return Super::eventFilter(watched, event);
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,6 @@ CDockWidgetSideTab::CDockWidgetSideTab(CDockWidget* DockWidget, QWidget* parent)
|
|||||||
d->DockWidget = DockWidget;
|
d->DockWidget = DockWidget;
|
||||||
setText(DockWidget->windowTitle());
|
setText(DockWidget->windowTitle());
|
||||||
setFocusPolicy(Qt::NoFocus);
|
setFocusPolicy(Qt::NoFocus);
|
||||||
setFlat(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -107,6 +106,7 @@ CDockWidgetSideTab::~CDockWidgetSideTab()
|
|||||||
void CDockWidgetSideTab::updateStyle()
|
void CDockWidgetSideTab::updateStyle()
|
||||||
{
|
{
|
||||||
internal::repolishStyle(this, internal::RepolishDirectChildren);
|
internal::repolishStyle(this, internal::RepolishDirectChildren);
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
/*
|
/*
|
||||||
* Default style sheet on Windows Platforms with focus highlighting flag enabled
|
* Default style sheet on Windows Platforms with focus highlighting flag enabled
|
||||||
*/
|
*/
|
||||||
ads--CDockManager {
|
ads--CDockManager
|
||||||
padding: 6px;
|
{
|
||||||
background: palette(window);
|
background: palette(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ads--CDockContainerWidget {
|
ads--CDockContainerWidget {
|
||||||
background: palette(window);
|
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*/
|
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"] {
|
ads--CDockWidgetSideTab[sideTabBarArea="1"],
|
||||||
/*border-bottom: 1px solid white;*/
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user