From 1383cd831dc088a3ce0ae99c652d21b0c6943c90 Mon Sep 17 00:00:00 2001 From: Mentalflow <312902918@qq.com> Date: Thu, 28 Mar 2024 09:08:05 +0800 Subject: [PATCH] RibbonWindow: Add new border. --- example/components/RibbonWindow.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/example/components/RibbonWindow.qml b/example/components/RibbonWindow.qml index 0bc21e5..3f53d0c 100644 --- a/example/components/RibbonWindow.qml +++ b/example/components/RibbonWindow.qml @@ -37,14 +37,20 @@ Window { anchors.fill: parent RibbonTitleBar { id: titleBar + anchors.topMargin: border_rect.border.width + anchors.leftMargin: border_rect.border.width + anchors.rightMargin: border_rect.border.width } Item{ id:container anchors{ top: titleBar.bottom left: parent.left + leftMargin: border_rect.border.width right: parent.right + rightMargin: border_rect.border.width bottom: parent.bottom + bottomMargin: border_rect.border.width } clip: true } @@ -64,6 +70,15 @@ Window { color: !RibbonTheme.dark_mode ? Qt.rgba(255,255,255,0.3) : Qt.rgba(0,0,0,0.3) visible: !Window.active } + Rectangle{ + id: border_rect + anchors.fill: parent + color: 'transparent' + border.color: RibbonTheme.dark_mode ? "#7A7A7A" : "#2C59B7" + border.width: RibbonTheme.modern_style ? 1 : 0 + radius: 10 + visible: RibbonTheme.modern_style + } RibbonPopup{ id: pop target: window_items