Skip to content

Instantly share code, notes, and snippets.

@Zren
Last active October 20, 2018 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zren/ce58e1b70693e9709160110828d04c44 to your computer and use it in GitHub Desktop.
Save Zren/ce58e1b70693e9709160110828d04c44 to your computer and use it in GitHub Desktop.
import QtQuick 2.0
import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kwin.private.kdecoration 1.0 as KDecoration
import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons
Item {
id: main
width: 400
height: 400
KDecoration.Bridge {
id: bridgeItem
// plugin: "org.kde.breeze"
// theme: ""
plugin: "org.kde.kwin.aurorae"
theme: "__aurorae__svg__Adapta"
}
KDecoration.Settings {
id: settingsItem
bridge: bridgeItem.bridge
borderSizesIndex: 3 // Normal
}
KDecoration.Decoration {
id: activePreview
anchors.fill: parent
anchors.margins: units.smallSpacing
bridge: bridgeItem.bridge
settings: settingsItem
Component.onCompleted: {
client.caption = "App Name"
client.active = true;
// anchors.leftMargin = Qt.binding(function() { return 10 - (activePreview.shadow ? activePreview.shadow.paddingLeft : 0);});
// anchors.rightMargin = Qt.binding(function() { return 40 - (activePreview.shadow ? activePreview.shadow.paddingRight : 0);});
// anchors.topMargin = Qt.binding(function() { return 40 - (activePreview.shadow ? activePreview.shadow.paddingTop : 0);});
// anchors.bottomMargin = Qt.binding(function() { return 10 - (activePreview.shadow ? activePreview.shadow.paddingBottom : 0);});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment