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(KF5WindowSystem REQUIRED)
find_package(MeuiKit REQUIRED)
find_package(FishUI REQUIRED)
set(SRCS
src/applicationitem.h
@ -47,7 +47,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
Qt5::DBus
Qt5::Svg
MeuiKit
FishUI
KF5::WindowSystem
)

View file

@ -8,7 +8,7 @@ CutefishOS application dock.
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

View file

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

View file

@ -2,7 +2,7 @@ import QtQuick 2.12
import QtQuick.Controls 2.12
import QtGraphicalEffects 1.0
import Cutefish.Dock 1.0
import MeuiKit 1.0 as Meui
import FishUI 1.0 as FishUI
Item {
id: control
@ -53,7 +53,7 @@ Item {
dragStarted = false
}
Meui.IconItem {
FishUI.IconItem {
id: icon
anchors.centerIn: parent
width: control.iconSize
@ -122,14 +122,14 @@ Item {
popupTips.popupText = control.popupText
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))
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))
else
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()
} else {
@ -142,7 +142,7 @@ Item {
id: activeLine
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
color: Meui.Theme.textColor
color: FishUI.Theme.textColor
radius: !isBottom ? width / 2 : height / 2
visible: enableActivateDot && !dragStarted
opacity: isActive ? 1 : 0.6

View file

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