Compare commits
No commits in common. "326fbdeeb8cb85e2462e591894e46c0f93a0e2c8" and "ac52c2710c4703af2853e9a173be2320c1db75e8" have entirely different histories.
326fbdeeb8
...
ac52c2710c
|
@ -8,10 +8,9 @@ Item {
|
||||||
property int blur_radius: 32
|
property int blur_radius: 32
|
||||||
property alias target: effect.sourceItem
|
property alias target: effect.sourceItem
|
||||||
property rect target_rect : Qt.rect(control.x, control.y, control.width, control.height)
|
property rect target_rect : Qt.rect(control.x, control.y, control.width, control.height)
|
||||||
property color mask_color: RibbonTheme.dark_mode ? RibbonTheme.modern_style ? '#292929' : "#212629" : "white"
|
property color mask_color: RibbonTheme.dark_mode ? "#212629" : "white"
|
||||||
property double mask_opacity: 0.5
|
property double mask_opacity: 0.5
|
||||||
property alias mask_border: mask.border
|
property alias mask_border: mask.border
|
||||||
property bool use_solid_bg: true
|
|
||||||
|
|
||||||
ShaderEffectSource {
|
ShaderEffectSource {
|
||||||
id: effect
|
id: effect
|
||||||
|
@ -19,6 +18,10 @@ Item {
|
||||||
sourceRect: target_rect
|
sourceRect: target_rect
|
||||||
sourceItem: target
|
sourceItem: target
|
||||||
visible: false
|
visible: false
|
||||||
|
Rectangle{
|
||||||
|
radius: control.radius
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GaussianBlur{
|
GaussianBlur{
|
||||||
|
@ -31,18 +34,13 @@ Item {
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle{
|
OpacityMask {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: use_solid_bg ? mask_color : 'transparent'
|
source: blur
|
||||||
radius: control.radius
|
maskSource: Rectangle{
|
||||||
OpacityMask {
|
width: control.width
|
||||||
anchors.fill: parent
|
height: control.height
|
||||||
source: blur
|
radius: control.radius
|
||||||
maskSource: Rectangle{
|
|
||||||
width: control.width
|
|
||||||
height: control.height
|
|
||||||
radius: control.radius
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,4 +51,6 @@ Item {
|
||||||
opacity: mask_opacity
|
opacity: mask_opacity
|
||||||
radius: control.radius
|
radius: control.radius
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@ Item {
|
||||||
visible: top_padding
|
visible: top_padding
|
||||||
clip: true
|
clip: true
|
||||||
target_rect: Qt.rect(x,y-top_padding,width,height)
|
target_rect: Qt.rect(x,y-top_padding,width,height)
|
||||||
use_solid_bg: false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item{
|
Item{
|
||||||
|
@ -73,6 +72,5 @@ Item {
|
||||||
visible: bottom_padding
|
visible: bottom_padding
|
||||||
clip: true
|
clip: true
|
||||||
target_rect: Qt.rect(x,y-top_padding,width,height)
|
target_rect: Qt.rect(x,y-top_padding,width,height)
|
||||||
use_solid_bg: false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,28 +108,4 @@ Window {
|
||||||
if (!comfirmed_quit)
|
if (!comfirmed_quit)
|
||||||
dialog.open()
|
dialog.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_popup(content_url, argument)
|
|
||||||
{
|
|
||||||
let component = Qt.createComponent(content_url,pop)
|
|
||||||
|
|
||||||
if (component.status === Component.Error) {
|
|
||||||
console.log(qsTr("Error loading component:"), component.errorString());
|
|
||||||
return
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (typeof(argument)!='undefined')
|
|
||||||
pop.contentItem = component.createObject(pop,argument)
|
|
||||||
else
|
|
||||||
pop.contentItem = component.createObject(pop)
|
|
||||||
}
|
|
||||||
pop.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
function close_popup()
|
|
||||||
{
|
|
||||||
pop.close()
|
|
||||||
pop.contentItem.destroy()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
RibbonUI::RibbonUI(QQuickItem *parent)
|
RibbonUI::RibbonUI(QQuickItem *parent)
|
||||||
: QQuickItem(parent)
|
: QQuickItem(parent)
|
||||||
{
|
{
|
||||||
_version = VER_JOIN((RIBBONUI_VERSION));
|
version(VER_JOIN((RIBBONUI_VERSION)));
|
||||||
_qt_version = QString(qVersion()).replace('.',"").toInt();
|
qt_version(QString(qVersion()).replace('.',"").toInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
RibbonUI* RibbonUI::instance(){
|
RibbonUI* RibbonUI::instance(){
|
||||||
|
|
|
@ -13,8 +13,8 @@ class RibbonUI : public QQuickItem
|
||||||
QML_ELEMENT
|
QML_ELEMENT
|
||||||
QML_SINGLETON
|
QML_SINGLETON
|
||||||
QML_NAMED_ELEMENT(RibbonUI)
|
QML_NAMED_ELEMENT(RibbonUI)
|
||||||
Q_PROPERTY_R(QString, version)
|
Q_PROPERTY_RW(QString, version)
|
||||||
Q_PROPERTY_R(int, qt_version)
|
Q_PROPERTY_RW(int, qt_version)
|
||||||
public:
|
public:
|
||||||
static RibbonUI* instance();
|
static RibbonUI* instance();
|
||||||
static RibbonUI* create(QQmlEngine *qmlEngine, QJSEngine *jsEngine){return instance();}
|
static RibbonUI* create(QQmlEngine *qmlEngine, QJSEngine *jsEngine){return instance();}
|
||||||
|
|
Loading…
Reference in New Issue