diff --git a/src/controls/RoundImageButton.qml b/src/controls/RoundImageButton.qml index 4ebe23d..275a127 100644 --- a/src/controls/RoundImageButton.qml +++ b/src/controls/RoundImageButton.qml @@ -30,6 +30,8 @@ Item { height: size width: size + property alias background: _background + property color backgroundColor: "transparent" property color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 2) : Qt.darker(FishUI.Theme.backgroundColor, 1.2) property color pressedColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.5) @@ -39,11 +41,11 @@ Item { signal clicked() Rectangle { - id: background + id: _background anchors.fill: parent anchors.margins: size * 0.1 radius: control.height / 2 - color: mouseArea.pressed ? pressedColor : mouseArea.containsMouse ? control.hoveredColor : "transparent" + color: mouseArea.pressed ? pressedColor : mouseArea.containsMouse ? control.hoveredColor : control.backgroundColor } MouseArea { diff --git a/src/controls/Window.qml b/src/controls/Window.qml index 584fb75..40e9f04 100644 --- a/src/controls/Window.qml +++ b/src/controls/Window.qml @@ -36,6 +36,7 @@ Window { default property alias content : _content.data property alias background: _background property alias header: _header + property alias headerBackground: _headerBackground property Item headerItem // Window helper @@ -234,11 +235,17 @@ Window { anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top - height: 40 + height: 35 - property int buttonSize: 32 + property int buttonSize: 31 property int spacing: (_header.height - _header.buttonSize) / 2 + Rectangle { + id: _headerBackground + anchors.fill: parent + color: "transparent" + } + TapHandler { enabled: !control.isFullScreen onTapped: if (tapCount === 2) toggleMaximized() diff --git a/src/controls/qmldir b/src/controls/qmldir index f9d0107..ac5d1b1 100644 --- a/src/controls/qmldir +++ b/src/controls/qmldir @@ -14,10 +14,11 @@ singleton Units 1.0 Units.qml ActionTextField 1.0 ActionTextField BusyIndicator 1.0 BusyIndicator.qml +DesktopMenu 1.0 DesktopMenu.qml +Dialog 1.0 Dialog.qml Icon 1.0 Icon.qml PopupTips 1.0 PopupTips.qml RoundedRect 1.0 RoundedRect.qml Window 1.0 Window.qml -WindowButton 1.0 WindowButton.qml +RoundImageButton 1.0 RoundImageButton.qml Toast 1.0 Toast.qml -DesktopMenu 1.0 DesktopMenu.qml diff --git a/src/fish-style/Slider.qml b/src/fish-style/Slider.qml index 86246cf..c527191 100644 --- a/src/fish-style/Slider.qml +++ b/src/fish-style/Slider.qml @@ -9,7 +9,7 @@ T.Slider { property int sliderTrackHeight: 5 implicitWidth: background.implicitWidth - implicitHeight: background.implicitHeight + implicitHeight: 22 snapMode: T.Slider.SnapOnRelease handle: Rectangle { @@ -17,7 +17,7 @@ T.Slider { x: control.leftPadding + (control.horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height)) - width: 26 + width: control.implicitHeight height: width radius: width / 2 opacity: 1 @@ -38,8 +38,8 @@ T.Slider { } background: Item { - implicitWidth: control.horizontal ? 200 : 16 - implicitHeight: control.horizontal ? 16 : 200 + implicitWidth: control.horizontal ? 200 : control.implicitHeight + implicitHeight: control.horizontal ? control.implicitHeight : 200 x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2) y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0) diff --git a/src/platforms/linux/blurhelper/windowblur.cpp b/src/platforms/linux/blurhelper/windowblur.cpp index 903bd48..4a88578 100644 --- a/src/platforms/linux/blurhelper/windowblur.cpp +++ b/src/platforms/linux/blurhelper/windowblur.cpp @@ -131,7 +131,7 @@ void WindowBlur::updateBlur() if (m_enabled) { qreal devicePixelRatio = m_view->screen()->devicePixelRatio(); QPainterPath path; - path.addRoundedRect(QRect(QPoint(0, 0), m_view->size() * devicePixelRatio), + path.addRoundedRect(QRectF(QPoint(0, 0), m_view->size() * devicePixelRatio), m_windowRadius * devicePixelRatio, m_windowRadius * devicePixelRatio); QVector data;