Added comprehensive support for the Advance Docking System.

main
Alex Huszagh 2021-07-20 17:09:57 -05:00
parent 37e1e0c063
commit 228009860b
19 changed files with 4079 additions and 4011 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
<svg width="100" height="100"> <svg width="100" height="100">
<g transform="scale(0.45) translate(30, 30)"> <g transform="scale(0.45) translate(30, 30)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M 79.796875 10 A 70 70 0 0 0 10 80 A 70 70 0 0 0 80 150 A 70 70 0 0 0 150 80 A 70 70 0 0 0 80 10 A 70 70 0 0 0 79.796875 10 z M 110.93359 38.5 C 114.11991 38.491338 117.30995 39.711206 119.74805 42.160156 C 124.62075 47.056656 124.64102 55.0179 119.79492 59.9375 L 98.519531 81.515625 L 119.81836 103.11523 C 124.62456 107.99983 124.55858 115.91021 119.67188 120.78711 C 114.78378 125.66191 106.92589 125.64952 102.12109 120.76562 L 80.96875 99.316406 L 59.777344 120.80664 C 54.928444 125.73044 47.044169 125.75142 42.167969 120.85352 C 37.295269 115.95702 37.274294 107.99577 42.121094 103.07617 L 63.396484 81.496094 L 42.099609 59.898438 C 37.292709 55.013838 37.357441 47.101509 42.244141 42.224609 C 47.132241 37.350509 54.992075 37.362194 59.796875 42.246094 L 80.949219 63.697266 L 102.14062 42.207031 C 104.56508 39.745131 107.74728 38.508662 110.93359 38.5 z " fill="#b33e3e" fill-opacity="1.0"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M 79.796875 10 A 70 70 0 0 0 10 80 A 70 70 0 0 0 80 150 A 70 70 0 0 0 150 80 A 70 70 0 0 0 80 10 A 70 70 0 0 0 79.796875 10 z M 110.93359 38.5 C 114.11991 38.491338 117.30995 39.711206 119.74805 42.160156 C 124.62075 47.056656 124.64102 55.0179 119.79492 59.9375 L 98.519531 81.515625 L 119.81836 103.11523 C 124.62456 107.99983 124.55858 115.91021 119.67188 120.78711 C 114.78378 125.66191 106.92589 125.64952 102.12109 120.76562 L 80.96875 99.316406 L 59.777344 120.80664 C 54.928444 125.73044 47.044169 125.75142 42.167969 120.85352 C 37.295269 115.95702 37.274294 107.99577 42.121094 103.07617 L 63.396484 81.496094 L 42.099609 59.898438 C 37.292709 55.013838 37.357441 47.101509 42.244141 42.224609 C 47.132241 37.350509 54.992075 37.362194 59.796875 42.246094 L 80.949219 63.697266 L 102.14062 42.207031 C 104.56508 39.745131 107.74728 38.508662 110.93359 38.5 z " fill="#2a79a3" fill-opacity="1.0"/>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,5 +1,5 @@
<svg width="150" height="150" > <svg width="150" height="150" >
<g> <g>
<path d="M 34.446565,74.553562 74.946563,115.05356 115.44657,74.553562 74.946563,34.053565 Z" fill="none" stroke="#a2a2a2" stroke-width="8.1" /> <path d="M 34.446565,74.553562 74.946563,115.05356 115.44657,74.553562 74.946563,34.053565 Z" fill="none" stroke="#a2a2a2" stroke-opacity="1.0" stroke-width="8.1" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 222 B

View File

@ -1,5 +1,5 @@
<svg width="150" height="150" > <svg width="150" height="150" >
<g> <g>
<path d="m 74.838633,26.399968 a 48.6,48.6 0 0 0 -48.438633,48.6 48.6,48.6 0 0 0 97.2,0 48.6,48.6 0 0 0 -48.761367,-48.6 z m -0.648633,11.34 36.45,36.45 L 74.19,110.63997 37.74,74.189968 Z" fill="#a2a2a2" /> <path d="m 74.838633,26.399968 a 48.6,48.6 0 0 0 -48.438633,48.6 48.6,48.6 0 0 0 97.2,0 48.6,48.6 0 0 0 -48.761367,-48.6 z m -0.648633,11.34 36.45,36.45 L 74.19,110.63997 37.74,74.189968 Z" fill="#eff0f1" fill-opacity="1.0" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 281 B

View File

@ -0,0 +1,5 @@
<svg width="150" height="150" >
<g>
<path d="m 74.838633,26.399968 a 48.6,48.6 0 0 0 -48.438633,48.6 48.6,48.6 0 0 0 97.2,0 48.6,48.6 0 0 0 -48.761367,-48.6 z m -0.648633,11.34 36.45,36.45 L 74.19,110.63997 37.74,74.189968 Z" fill="#2a79a3" fill-opacity="1.0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 281 B

View File

@ -102,11 +102,13 @@ if args.pyqt6:
AlignLeft = QtCore.Qt.AlignmentFlag.AlignLeft AlignLeft = QtCore.Qt.AlignmentFlag.AlignLeft
ReadOnly = QtCore.QFile.OpenModeFlag.ReadOnly ReadOnly = QtCore.QFile.OpenModeFlag.ReadOnly
Text = QtCore.QFile.OpenModeFlag.Text Text = QtCore.QFile.OpenModeFlag.Text
WindowMaximized = QtCore.Qt.WindowState.WindowMaximized
else: else:
AlignTop = QtCore.Qt.AlignTop AlignTop = QtCore.Qt.AlignTop
AlignLeft = QtCore.Qt.AlignLeft AlignLeft = QtCore.Qt.AlignLeft
ReadOnly = QtCore.QFile.ReadOnly ReadOnly = QtCore.QFile.ReadOnly
Text = QtCore.QFile.Text Text = QtCore.QFile.Text
WindowMaximized = QtCore.Qt.WindowMaximized
# Need to fix an issue on Wayland on Linux: # Need to fix an issue on Wayland on Linux:
# conda-forge does not support Wayland, for who knows what reason. # conda-forge does not support Wayland, for who knows what reason.
@ -169,8 +171,9 @@ def main():
table_widget = QtAds.CDockWidget('Table') table_widget = QtAds.CDockWidget('Table')
table = QtWidgets.QTableWidget() table = QtWidgets.QTableWidget()
table.setColumnCount(5) # make sure we have both scroll areas active.
table.setRowCount(5) table.setColumnCount(40)
table.setRowCount(40)
table_widget.setWidget(table) table_widget.setWidget(table)
table_widget.setMinimumSizeHintMode(QtAds.CDockWidget.MinimumSizeHintFromDockWidget) table_widget.setMinimumSizeHintMode(QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
dock_manager.addDockWidget(QtAds.DockWidgetArea.RightDockWidgetArea, table_widget, dock_area) dock_manager.addDockWidget(QtAds.DockWidgetArea.RightDockWidgetArea, table_widget, dock_area)
@ -179,6 +182,7 @@ def main():
dock_manager.setStyleSheet('') dock_manager.setStyleSheet('')
# run # run
window.setWindowState(WindowMaximized)
window.show() window.show()
if args.pyqt6: if args.pyqt6:
return app.exec() return app.exec()

View File

@ -21,3 +21,7 @@ Document this...
Adds tooltips to QDockWidget's float and close buttons. Adds tooltips to QDockWidget's float and close buttons.
**TODO(ahuszagh)** Add image **TODO(ahuszagh)** Add image
# Creating Extensions
**TODO(ahuszagh)** Document...

View File

@ -1,5 +1,5 @@
<svg width="150" height="150" > <svg width="150" height="150" >
<g> <g>
<path d="M 34.446565,74.553562 74.946563,115.05356 115.44657,74.553562 74.946563,34.053565 Z" fill="none" stroke="^0^" stroke-width="8.1" /> <path d="M 34.446565,74.553562 74.946563,115.05356 115.44657,74.553562 74.946563,34.053565 Z" fill="none" stroke="^0^" stroke-opacity="^1^" stroke-width="8.1" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 218 B

View File

@ -1,5 +1,5 @@
<svg width="150" height="150" > <svg width="150" height="150" >
<g> <g>
<path d="m 74.838633,26.399968 a 48.6,48.6 0 0 0 -48.438633,48.6 48.6,48.6 0 0 0 97.2,0 48.6,48.6 0 0 0 -48.761367,-48.6 z m -0.648633,11.34 36.45,36.45 L 74.19,110.63997 37.74,74.189968 Z" fill="^0^" /> <path d="m 74.838633,26.399968 a 48.6,48.6 0 0 0 -48.438633,48.6 48.6,48.6 0 0 0 97.2,0 48.6,48.6 0 0 0 -48.761367,-48.6 z m -0.648633,11.34 36.45,36.45 L 74.19,110.63997 37.74,74.189968 Z" fill="^0^" fill-opacity="^1^" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 258 B

After

Width:  |  Height:  |  Size: 277 B

View File

@ -2,20 +2,20 @@
// with `//` are removed. No other comments are valid. // with `//` are removed. No other comments are valid.
{ {
"ads_menu_button": { "ads_menu_button": {
"default": ["foreground:hex", "foreground:opacity"], "default": ["dock:float:hex", "dock:float:opacity"],
"hover": ["highlight:dark:hex", "highlight:dark:opacity"], "hover": ["close:hover:hex", "close:hover:opacity"],
"pressed": ["highlight:hex", "highlight:opacity"] "pressed": ["highlight:dark:hex", "highlight:dark:opacity"]
}, },
"ads_maximize": { "ads_maximize": {
"default": ["foreground:hex", "foreground:opacity"], "default": ["dock:float:hex", "dock:float:opacity"],
"hover": ["highlight:dark:hex", "highlight:dark:opacity"], "hover": ["close:hover:hex", "close:hover:opacity"],
"pressed": ["highlight:hex", "highlight:opacity"] "pressed": ["highlight:dark:hex", "highlight:dark:opacity"]
}, },
"ads_detach": { "ads_detach": {
"default": ["dock:float"] "default": ["dock:float:hex", "dock:float:opacity"]
}, },
"ads_detach_hover": { "ads_detach_hover": {
"default": ["dock:float", "foreground"], "default": ["close:hover:hex", "close:hover:opacity"],
"pressed": ["highlight:dark", "foreground"] "pressed": ["highlight:dark:hex", "highlight:dark:opacity"]
} }
} }

View File

@ -1,20 +0,0 @@
# Tests
- Need to fix:
- FFI tests
- Rust bindings ✔
- Python bindings ✔
- C bindings
- C++ bindings
- Travis CI integrations
# Rework the Options API
# Simplify Trait Bounds
- Remove some hard-coded, 64-bit logic afterwards
- **TEST IT**
# Simplify API macros
- from_lexical, from_lexical_with_options
- to_lexical, to_lexical_with_options
- Should be able to take a single function, and repeat types

View File

@ -80,17 +80,17 @@
#tabsMenuButton #tabsMenuButton
{ {
image: url(^style^menu_button.svg); image: url(^style^ads_menu_button.svg);
} }
#tabsMenuButton:hover #tabsMenuButton:hover
{ {
image: url(^style^menu_button_hover.svg); image: url(^style^ads_menu_button_hover.svg);
} }
#tabsMenuButton:pressed #tabsMenuButton:pressed
{ {
image: url(^style^menu_button_pressed.svg); image: url(^style^ads_menu_button_pressed.svg);
} }
#tabsMenuButton::menu-indicator #tabsMenuButton::menu-indicator
@ -113,6 +113,14 @@
image: url(^style^ads_detach_hover_pressed.svg); 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 #floatingTitleMaximizeButton
{ {
image: url(^style^ads_maximize.svg); image: url(^style^ads_maximize.svg);
@ -127,3 +135,60 @@
{ {
image: url(^style^ads_maximize_pressed.svg); 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;
}

View File

@ -1,5 +1,5 @@
<svg width="100" height="100"> <svg width="100" height="100">
<g transform="scale(0.45) translate(30, 30)"> <g transform="scale(0.45) translate(30, 30)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M 79.796875 10 A 70 70 0 0 0 10 80 A 70 70 0 0 0 80 150 A 70 70 0 0 0 150 80 A 70 70 0 0 0 80 10 A 70 70 0 0 0 79.796875 10 z M 110.93359 38.5 C 114.11991 38.491338 117.30995 39.711206 119.74805 42.160156 C 124.62075 47.056656 124.64102 55.0179 119.79492 59.9375 L 98.519531 81.515625 L 119.81836 103.11523 C 124.62456 107.99983 124.55858 115.91021 119.67188 120.78711 C 114.78378 125.66191 106.92589 125.64952 102.12109 120.76562 L 80.96875 99.316406 L 59.777344 120.80664 C 54.928444 125.73044 47.044169 125.75142 42.167969 120.85352 C 37.295269 115.95702 37.274294 107.99577 42.121094 103.07617 L 63.396484 81.496094 L 42.099609 59.898438 C 37.292709 55.013838 37.357441 47.101509 42.244141 42.224609 C 47.132241 37.350509 54.992075 37.362194 59.796875 42.246094 L 80.949219 63.697266 L 102.14062 42.207031 C 104.56508 39.745131 107.74728 38.508662 110.93359 38.5 z " fill="#b33e3e" fill-opacity="1.0"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M 79.796875 10 A 70 70 0 0 0 10 80 A 70 70 0 0 0 80 150 A 70 70 0 0 0 150 80 A 70 70 0 0 0 80 10 A 70 70 0 0 0 79.796875 10 z M 110.93359 38.5 C 114.11991 38.491338 117.30995 39.711206 119.74805 42.160156 C 124.62075 47.056656 124.64102 55.0179 119.79492 59.9375 L 98.519531 81.515625 L 119.81836 103.11523 C 124.62456 107.99983 124.55858 115.91021 119.67188 120.78711 C 114.78378 125.66191 106.92589 125.64952 102.12109 120.76562 L 80.96875 99.316406 L 59.777344 120.80664 C 54.928444 125.73044 47.044169 125.75142 42.167969 120.85352 C 37.295269 115.95702 37.274294 107.99577 42.121094 103.07617 L 63.396484 81.496094 L 42.099609 59.898438 C 37.292709 55.013838 37.357441 47.101509 42.244141 42.224609 C 47.132241 37.350509 54.992075 37.362194 59.796875 42.246094 L 80.949219 63.697266 L 102.14062 42.207031 C 104.56508 39.745131 107.74728 38.508662 110.93359 38.5 z " fill="#2d93c8" fill-opacity="0.5"/>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,5 +1,5 @@
<svg width="150" height="150" > <svg width="150" height="150" >
<g> <g>
<path d="M 34.446565,74.553562 74.946563,115.05356 115.44657,74.553562 74.946563,34.053565 Z" fill="none" stroke="#a2a2a2" stroke-width="8.1" /> <path d="M 34.446565,74.553562 74.946563,115.05356 115.44657,74.553562 74.946563,34.053565 Z" fill="none" stroke="#a2a2a2" stroke-opacity="1.0" stroke-width="8.1" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 222 B

View File

@ -1,5 +1,5 @@
<svg width="150" height="150" > <svg width="150" height="150" >
<g> <g>
<path d="m 74.838633,26.399968 a 48.6,48.6 0 0 0 -48.438633,48.6 48.6,48.6 0 0 0 97.2,0 48.6,48.6 0 0 0 -48.761367,-48.6 z m -0.648633,11.34 36.45,36.45 L 74.19,110.63997 37.74,74.189968 Z" fill="#a2a2a2" /> <path d="m 74.838633,26.399968 a 48.6,48.6 0 0 0 -48.438633,48.6 48.6,48.6 0 0 0 97.2,0 48.6,48.6 0 0 0 -48.761367,-48.6 z m -0.648633,11.34 36.45,36.45 L 74.19,110.63997 37.74,74.189968 Z" fill="#31363b" fill-opacity="1.0" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 281 B

View File

@ -0,0 +1,5 @@
<svg width="150" height="150" >
<g>
<path d="m 74.838633,26.399968 a 48.6,48.6 0 0 0 -48.438633,48.6 48.6,48.6 0 0 0 97.2,0 48.6,48.6 0 0 0 -48.761367,-48.6 z m -0.648633,11.34 36.45,36.45 L 74.19,110.63997 37.74,74.189968 Z" fill="#2d93c8" fill-opacity="0.5" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 281 B

View File

@ -63,13 +63,14 @@
"close": { "close": {
"default": ["midtone:dark:hex", "midtone:dark:opacity"], "default": ["midtone:dark:hex", "midtone:dark:opacity"],
"hover": ["close:hover:hex", "close:hover:opacity"], "hover": ["close:hover:hex", "close:hover:opacity"],
"pressed": ["close:pressed:hex", "close:pressed:opacity"] "pressed": ["highlight:dark:hex", "highlight:dark:opacity"]
}, },
"undock": { "undock": {
"default": ["dock:float"] "default": ["dock:float:hex", "dock:float:opacity"]
}, },
"undock_hover": { "undock_hover": {
"default": ["dock:float", "foreground"] "default": ["close:hover:hex", "close:hover:opacity"],
"pressed": ["highlight:dark:hex", "highlight:dark:opacity"]
}, },
// Tree views. // Tree views.
"branch_open": { "branch_open": {

View File

@ -1,5 +1,5 @@
<svg width="150" height="150" > <svg width="150" height="150" >
<g> <g>
<path d="M 34.446565,74.553562 74.946563,115.05356 115.44657,74.553562 74.946563,34.053565 Z" fill="none" stroke="^0^" stroke-width="8.1" /> <path d="M 34.446565,74.553562 74.946563,115.05356 115.44657,74.553562 74.946563,34.053565 Z" fill="none" stroke="^0^" stroke-opacity="^1^" stroke-width="8.1" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 218 B

View File

@ -1,5 +1,5 @@
<svg width="150" height="150" > <svg width="150" height="150" >
<g> <g>
<path d="m 74.838633,26.399968 a 48.6,48.6 0 0 0 -48.438633,48.6 48.6,48.6 0 0 0 97.2,0 48.6,48.6 0 0 0 -48.761367,-48.6 z m -0.648633,11.34 36.45,36.45 L 74.19,110.63997 37.74,74.189968 Z" fill="^0^" /> <path d="m 74.838633,26.399968 a 48.6,48.6 0 0 0 -48.438633,48.6 48.6,48.6 0 0 0 97.2,0 48.6,48.6 0 0 0 -48.761367,-48.6 z m -0.648633,11.34 36.45,36.45 L 74.19,110.63997 37.74,74.189968 Z" fill="^0^" fill-opacity="^1^" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 258 B

After

Width:  |  Height:  |  Size: 277 B