mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
sync with mobilecomponents a85365111 + patches
This is the latest state of the upstream art from Plasma, plus our patches to disable the gamma effect on the icon, and the drawer removed. Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
parent
8664925e20
commit
548d6fc956
11 changed files with 553 additions and 904 deletions
|
|
@ -27,6 +27,8 @@ MouseArea {
|
|||
property alias iconSource: icon.source
|
||||
property bool checkable: false
|
||||
property bool checked: false
|
||||
//either Action or QAction should work here
|
||||
property QtObject action
|
||||
Layout.minimumWidth: Units.iconSizes.large
|
||||
Layout.maximumWidth: Layout.minimumWidth
|
||||
implicitWidth: Units.iconSizes.large
|
||||
|
|
@ -34,8 +36,8 @@ MouseArea {
|
|||
drag {
|
||||
target: button
|
||||
axis: Drag.XAxis
|
||||
minimumX: contextDrawer ? 0 : parent.width/2 - width/2
|
||||
maximumX: globalDrawer ? parent.width : parent.width/2 - width/2
|
||||
minimumX: parent.width/2 - width/2 - (contextDrawer && contextDrawer.enabled ? contextDrawer.contentItem.width : 0)
|
||||
maximumX: parent.width/2 - width/2 + (globalDrawer && globalDrawer.enabled ? globalDrawer.contentItem.width : 0)
|
||||
}
|
||||
function toggleVisibility() {
|
||||
showAnimation.running = false;
|
||||
|
|
@ -74,6 +76,11 @@ MouseArea {
|
|||
if (checkable) {
|
||||
checked = !checked;
|
||||
}
|
||||
|
||||
//if an action has been assigned, trigger it
|
||||
if (button.action && button.action.trigger) {
|
||||
button.action.trigger();
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: globalDrawer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue