Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkdeclarative
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#374
  • Loading branch information
deepin-ci-robot committed Aug 13, 2024
1 parent c2d07b2 commit b2280f6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
35 changes: 20 additions & 15 deletions qt6/src/qml/DialogTitleBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
//
// SPDX-License-Identifier: LGPL-3.0-or-later

import QtQuick 2.11
import QtQuick.Window 2.11
import QtQuick.Layouts 1.11
import QtQuick
import QtQuick.Window
import QtQuick.Layouts
import org.deepin.dtk 1.0 as D
import org.deepin.dtk.style 1.0 as DS

Control {
Item {
id: control
z: D.DTK.TopOrder
width: Window.window.width
Expand Down Expand Up @@ -39,15 +39,17 @@ Control {
}
}

background: D.InWindowBlur {
D.InWindowBlur {
id: background
visible: false
anchors.fill: parent
}

contentItem: ColumnLayout {
ColumnLayout {
id: content
spacing: 0

anchors.fill: parent
Rectangle {
id: separatorTop
Layout.preferredWidth: parent.width
Expand All @@ -63,15 +65,18 @@ Control {
Layout.preferredWidth: parent.width
Layout.leftMargin: DS.Style.titleBar.leftMargin

D.DciIcon {
id: iconLabel
visible: name !== ""
mode: control.D.ColorSelector.controlState
theme: control.D.ColorSelector.controlTheme
palette: D.DTK.makeIconPalette(control.palette)
sourceSize {
width: DS.Style.dialogWindow.iconSize
height: DS.Style.dialogWindow.iconSize
Control {
id: iconControl
contentItem: D.DciIcon {
id: iconLabel
visible: name !== ""
mode: iconControl.D.ColorSelector.controlState
theme: iconControl.D.ColorSelector.controlTheme
palette: D.DTK.makeIconPalette(iconControl.palette)
sourceSize {
width: DS.Style.dialogWindow.iconSize
height: DS.Style.dialogWindow.iconSize
}
}
}

Expand Down
11 changes: 6 additions & 5 deletions qt6/src/qml/DialogWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//
// SPDX-License-Identifier: LGPL-3.0-or-later

import QtQuick 2.11
import QtQuick.Layouts 1.11
import QtQuick.Window 2.11
import QtQuick
import QtQuick.Layouts
import QtQuick.Window
import org.deepin.dtk 1.0 as D
import org.deepin.dtk.style 1.0 as DS

Expand All @@ -31,10 +31,11 @@ Window {
default property alias content: contentLoader.children
property alias palette : content.palette

Control {
Item {
id: content
palette: control.active ? D.DTK.palette : D.DTK.inactivePalette
contentItem: ColumnLayout {
implicitHeight: childrenRect.height
ColumnLayout {
id: layout
spacing: 0

Expand Down

0 comments on commit b2280f6

Please sign in to comment.