Optimize dialog

pull/3/head
cutefishd 5 years ago
parent 5dea1e360f
commit 4b28366c9f

1
debian/control vendored

@ -5,6 +5,7 @@ Maintainer: CutefishOS <cutefishos@foxmail.com>
Build-Depends: cmake,
debhelper (>= 9),
extra-cmake-modules,
libxcb1-dev,
libkf5windowsystem-dev,
libqt5x11extras5-dev,
qtbase5-dev,

@ -25,6 +25,8 @@
#include <QX11Info>
#include <xcb/xcb.h>
#include <xcb/shape.h>
#include <xcb/xcb_icccm.h>
WindowBlur::WindowBlur(QObject *parent) noexcept
: QObject(parent)

@ -37,6 +37,7 @@ QtObject {
property real smallRadius: 8.0
property real mediumRadius: 10.0
property real bigRadius: 12.0
property real hugeRadius: 14.0
property font defaultFont: fontMetrics.font
property font smallFont: {

@ -209,7 +209,6 @@ Window {
ColumnLayout {
anchors.fill: parent
// anchors.margins: !isMaximized && !isFullScreen ? 1 : 0
anchors.margins: 0
spacing: 0

@ -34,9 +34,8 @@ T.Dialog {
contentWidth > 0 ? contentHeight + topPadding + bottomPadding : 0)
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) + header.implicitHeight + footer.implicitHeight
padding: FishUI.Units.largeSpacing
contentHeight: contentItem.implicitHeight + header.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) + header.implicitHeight + footer.implicitHeight
padding: FishUI.Theme.hugeRadius
enter: Transition {
NumberAnimation {
@ -61,7 +60,7 @@ T.Dialog {
contentItem: Item {}
background: Rectangle {
radius: FishUI.Theme.mediumRadius
radius: FishUI.Theme.hugeRadius
color: FishUI.Theme.backgroundColor
border.width: 1
border.color: FishUI.Theme.darkMode ? Qt.rgba(255, 255, 255, 0.2) : Qt.rgba(0, 0, 0, 0.1)
@ -78,7 +77,8 @@ T.Dialog {
}
header: Item {
height: _headerLabel.visible ? _headerLabel.height + FishUI.Units.largeSpacing : 0
id: _headerItem
implicitHeight: _headerLabel.visible ? _headerLabel.implicitHeight + FishUI.Units.largeSpacing : 0
Label {
id: _headerLabel

Loading…
Cancel
Save