/** * ADVANCED DOCKING SYSTEM STYLESHEET * ---------------------------------- */ /** * The general approach is as follows: * 1. Turn `qproperty-icon` off. * This avoids having a weird background, preventing our desired icon. * This is presumably because ADS uses `qproperty-icon`. * 2. Ensure the background is set. * This is to avoid any QToolButton styling hints when the * widget is clicked. * 3. Set the QTOolButton width and height. * This gives us consistent icon sizes without compression. * 4. Undo the border. * Must keep the border width identical to before (0.04em), * to avoid moving the widgets on pressed/hover events. */ #tabCloseButton, #dockAreaCloseButton, #tabsMenuButton, #detachGroupButton, #floatingTitleCloseButton, #floatingTitleMaximizeButton { qproperty-icon: url(^style^transparent.svg); background: ^background^; width: 1.2em; height: 1.2em; padding: 0em; margin: 0em; border: 0.04em transparent black; } #tabsMenuButton, #floatingTitleMaximizeButton { /* Need to make the icon smaller, or else it's unusually large. */ width: 0.8em; } #tabCloseButton:hover, #dockAreaCloseButton:hover, #tabsMenuButton:hover, #detachGroupButton:hover, #floatingTitleCloseButton:hover, #floatingTitleMaximizeButton:hover, #tabCloseButton:pressed, #dockAreaCloseButton:pressed, #tabsMenuButton:pressed, #detachGroupButton:pressed, #floatingTitleCloseButton:pressed, #floatingTitleMaximizeButton:pressed { background: ^background^; } #tabCloseButton, #dockAreaCloseButton, #floatingTitleCloseButton { image: url(^style^ads_close.svg); } #tabCloseButton:hover, #dockAreaCloseButton:hover, #floatingTitleCloseButton:hover { image: url(^style^ads_close_hover.svg); } #tabCloseButton:pressed, #dockAreaCloseButton:pressed, #floatingTitleCloseButton:pressed { image: url(^style^ads_close_pressed.svg); } #tabsMenuButton { image: url(^style^ads_menu_button.svg); } #tabsMenuButton:hover { image: url(^style^ads_menu_button_hover.svg); } #tabsMenuButton:pressed { image: url(^style^ads_menu_button_pressed.svg); } #tabsMenuButton::menu-indicator { image: none; } #detachGroupButton { image: url(^style^ads_detach.svg); } #detachGroupButton:hover { image: url(^style^ads_detach_hover.svg); } #detachGroupButton:pressed { image: url(^style^ads_detach_hover_pressed.svg); } /* FLOATING */ /* Disable the default icons when the dock is floating. */ ads--CFloatingWidgetTitleBar { qproperty-maximizeIcon: url(^style^transparent.svg); qproperty-normalIcon: url(^style^transparent.svg); } #floatingTitleMaximizeButton { image: url(^style^ads_maximize.svg); } #floatingTitleMaximizeButton:hover { image: url(^style^ads_maximize_hover.svg); } #floatingTitleMaximizeButton:pressed { image: url(^style^ads_maximize_pressed.svg); } /** * Using the `maximized="true"`, `isMaximized="true"`, or other attribute * selectors don't work, and since the maximize button and minimize * button are always the same... * * To get a nicer looking UI, just use the same maximize and restore * buttons. */ /* TABS */ ads--CDockWidgetTab { border: 0.04em solid ^midtone^; border-top: 0.09em solid ^midtone^; background-color: ^tab:background^; padding: 0.23em; min-width: 50px; border-radius: 0.09em; border-bottom-left-radius: 0em; border-bottom-right-radius: 0em; } ads--CDockWidgetTab[activeTab="true"] { background-color: ^tab:background:selected^; border-top: 0.09em solid ^highlight^; border-left: 0.04em solid ^midtone^; border-right: 0.04em solid ^midtone^; border-bottom: 0.04em tansparent ^midtone^; } ads--CDockWidgetTab QLabel { background-color: ^tab:background^; } ads--CDockWidgetTab[activeTab="true"] QLabel { background-color: ^tab:background:selected^; } /** * CDockWidgetTab doesn't seem to have the concept of `::next-selected` * and `::previous-selected`, so we just draw the borders for everything. * It's not nearly as pretty, but it's not bad either. */ /* OVERLAY */ ads--CDockOverlayCross { qproperty-iconFrameColor: ^highlight^; qproperty-iconBackgroundColor: ^view:background^; qproperty-iconOverlayColor: ^highlight^; qproperty-iconArrowColor: ^foreground^; qproperty-iconShadowColor: transparent; }