Update FishUI

This commit is contained in:
cutefishd 2021-04-09 22:38:15 +08:00
parent bdbd0cd133
commit 22a5953624
5 changed files with 19 additions and 19 deletions

View file

@ -13,7 +13,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 CONFIG REQUIRED Widgets DBus X11Extras Concurrent Svg LinguistTools QuickControls2) find_package(Qt5 CONFIG REQUIRED Widgets DBus X11Extras Concurrent Svg LinguistTools QuickControls2)
find_package(KF5WindowSystem REQUIRED) find_package(KF5WindowSystem REQUIRED)
find_package(MeuiKit REQUIRED) find_package(FishUI REQUIRED)
set(SRCS set(SRCS
src/applicationitem.h src/applicationitem.h
@ -47,7 +47,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
Qt5::DBus Qt5::DBus
Qt5::Svg Qt5::Svg
MeuiKit FishUI
KF5::WindowSystem KF5::WindowSystem
) )

View file

@ -8,7 +8,7 @@ CutefishOS application dock.
sudo pacman -S gcc cmake qt5-base qt5-quickcontrols2 kwindowsystem sudo pacman -S gcc cmake qt5-base qt5-quickcontrols2 kwindowsystem
``` ```
You also need [`meuikit`](https://github.com/cyberos/meuikit) and [`libcyber-system`](https://github.com/cyberos/libcyber-system). You also need [`fishui`](https://github.com/cutefishos/fishui) and [`libcutefish`](https://github.com/cutefishos/libcutefish).
## Build and Install ## Build and Install

View file

@ -1,7 +1,7 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import Cutefish.Dock 1.0 import Cutefish.Dock 1.0
import MeuiKit 1.0 as Meui import FishUI 1.0 as FishUI
DockItem { DockItem {
id: appItem id: appItem
@ -37,7 +37,7 @@ DockItem {
updateGeometry() updateGeometry()
} }
Meui.DesktopMenu { FishUI.DesktopMenu {
id: contextMenu id: contextMenu
MenuItem { MenuItem {

View file

@ -2,7 +2,7 @@ import QtQuick 2.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import Cutefish.Dock 1.0 import Cutefish.Dock 1.0
import MeuiKit 1.0 as Meui import FishUI 1.0 as FishUI
Item { Item {
id: control id: control
@ -53,7 +53,7 @@ Item {
dragStarted = false dragStarted = false
} }
Meui.IconItem { FishUI.IconItem {
id: icon id: icon
anchors.centerIn: parent anchors.centerIn: parent
width: control.iconSize width: control.iconSize
@ -122,14 +122,14 @@ Item {
popupTips.popupText = control.popupText popupTips.popupText = control.popupText
if (Settings.direction === DockSettings.Left) if (Settings.direction === DockSettings.Left)
popupTips.position = Qt.point(root.width + Meui.Units.largeSpacing, popupTips.position = Qt.point(root.width + FishUI.Units.largeSpacing,
control.mapToGlobal(0, 0).y + (control.height / 2 - popupTips.height / 2)) control.mapToGlobal(0, 0).y + (control.height / 2 - popupTips.height / 2))
else if (Settings.direction === DockSettings.Right) else if (Settings.direction === DockSettings.Right)
popupTips.position = Qt.point(control.mapToGlobal(0, 0).x - popupTips.width - Meui.Units.smallSpacing / 2, popupTips.position = Qt.point(control.mapToGlobal(0, 0).x - popupTips.width - FishUI.Units.smallSpacing / 2,
control.mapToGlobal(0, 0).y + (control.height / 2 - popupTips.height / 2)) control.mapToGlobal(0, 0).y + (control.height / 2 - popupTips.height / 2))
else else
popupTips.position = Qt.point(control.mapToGlobal(0, 0).x + (control.width / 2 - popupTips.width / 2), popupTips.position = Qt.point(control.mapToGlobal(0, 0).x + (control.width / 2 - popupTips.width / 2),
control.mapToGlobal(0, 0).y - popupTips.height - Meui.Units.smallSpacing) control.mapToGlobal(0, 0).y - popupTips.height - FishUI.Units.smallSpacing)
popupTips.show() popupTips.show()
} else { } else {
@ -142,7 +142,7 @@ Item {
id: activeLine id: activeLine
width: !isBottom ? parent.width * 0.06 : (isActive ? parent.height * 0.4 : parent.height * 0.06) width: !isBottom ? parent.width * 0.06 : (isActive ? parent.height * 0.4 : parent.height * 0.06)
height: !isBottom ? (isActive ? parent.height * 0.4 : parent.height * 0.06) : parent.height * 0.06 height: !isBottom ? (isActive ? parent.height * 0.4 : parent.height * 0.06) : parent.height * 0.06
color: Meui.Theme.textColor color: FishUI.Theme.textColor
radius: !isBottom ? width / 2 : height / 2 radius: !isBottom ? width / 2 : height / 2
visible: enableActivateDot && !dragStarted visible: enableActivateDot && !dragStarted
opacity: isActive ? 1 : 0.6 opacity: isActive ? 1 : 0.6

View file

@ -4,7 +4,7 @@ import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import Cutefish.Dock 1.0 import Cutefish.Dock 1.0
import MeuiKit 1.0 as Meui import FishUI 1.0 as FishUI
Item { Item {
id: root id: root
@ -18,14 +18,14 @@ Item {
enabled: true enabled: true
} }
Meui.WindowShadow { FishUI.WindowShadow {
view: mainWindow view: mainWindow
geometry: Qt.rect(root.x, root.y, root.width, root.height) geometry: Qt.rect(root.x, root.y, root.width, root.height)
strength: 0.5 strength: 0.5
radius: _background.radius radius: _background.radius
} }
Meui.WindowBlur { FishUI.WindowBlur {
view: mainWindow view: mainWindow
geometry: Qt.rect(root.x, root.y, root.width, root.height) geometry: Qt.rect(root.x, root.y, root.width, root.height)
windowRadius: _background.radius windowRadius: _background.radius
@ -37,8 +37,8 @@ Item {
id: _background id: _background
anchors.fill: parent anchors.fill: parent
radius: windowRadius radius: windowRadius
color: Meui.Theme.backgroundColor color: FishUI.Theme.backgroundColor
opacity: Meui.Theme.darkMode ? 0.3 : 0.4 opacity: FishUI.Theme.darkMode ? 0.3 : 0.4
Behavior on opacity { Behavior on opacity {
NumberAnimation { NumberAnimation {
@ -78,10 +78,10 @@ Item {
smooth: true smooth: true
} }
Meui.PopupTips { FishUI.PopupTips {
id: popupTips id: popupTips
backgroundColor: Meui.Theme.backgroundColor backgroundColor: FishUI.Theme.backgroundColor
backgroundOpacity: Meui.Theme.darkMode ? 0.3 : 0.4 backgroundOpacity: FishUI.Theme.darkMode ? 0.3 : 0.4
} }
GridLayout { GridLayout {