diff --git a/src/appearance.cpp b/src/appearance.cpp
index f3381db..b92fba5 100644
--- a/src/appearance.cpp
+++ b/src/appearance.cpp
@@ -47,6 +47,8 @@ Appearance::Appearance(QObject *parent)
m_dockDirection = m_dockSettings->value("Direction").toInt();
m_dockVisibility = m_dockSettings->value("Visibility").toInt();
m_dockRoundedWindow = m_dockSettings->value("RoundedWindow").toBool();
+ m_dockStyle = m_dockSettings->value("Style").toInt();
+
m_kwinSettings->beginGroup("Compositing");
m_systemEffects = !m_kwinSettings->value("OpenGLIsUnsafe", false).toBool();
m_kwinSettings->endGroup();
@@ -157,6 +159,28 @@ void Appearance::setDockRoundedWindow(bool enable)
m_dockSettings->setValue("RoundedWindow", m_dockRoundedWindow);
}
+int Appearance::dockStyle() const
+{
+ return m_dockStyle;
+}
+
+void Appearance::setDockStyle(int style)
+{
+ if (m_dockStyle != style) {
+ m_dockStyle = style;
+
+ QDBusInterface iface("com.cutefish.Dock",
+ "/Dock",
+ "com.cutefish.Dock",
+ QDBusConnection::sessionBus());
+ if (iface.isValid()) {
+ iface.call("setStyle", style);
+ }
+
+ emit dockStyleChanged();
+ }
+}
+
void Appearance::setGenericFontFamily(const QString &name)
{
if (name.isEmpty())
diff --git a/src/appearance.h b/src/appearance.h
index 68b64c2..dea5efe 100644
--- a/src/appearance.h
+++ b/src/appearance.h
@@ -30,6 +30,7 @@ class Appearance : public QObject
Q_PROPERTY(int dockIconSize READ dockIconSize WRITE setDockIconSize NOTIFY dockIconSizeChanged)
Q_PROPERTY(int dockDirection READ dockDirection WRITE setDockDirection NOTIFY dockDirectionChanged)
Q_PROPERTY(int dockVisibility READ dockVisibility WRITE setDockVisibility NOTIFY dockVisibilityChanged)
+ Q_PROPERTY(int dockStyle READ dockStyle WRITE setDockStyle NOTIFY dockStyleChanged)
Q_PROPERTY(int fontPointSize READ fontPointSize WRITE setFontPointSize NOTIFY fontPointSizeChanged)
Q_PROPERTY(bool dimsWallpaper READ dimsWallpaper WRITE setDimsWallpaper NOTIFY dimsWallpaperChanged)
Q_PROPERTY(double devicePixelRatio READ devicePixelRatio WRITE setDevicePixelRatio NOTIFY devicePixelRatioChanged)
@@ -57,6 +58,9 @@ public:
int dockRoundedWindow() const;
Q_INVOKABLE void setDockRoundedWindow(bool enable);
+ int dockStyle() const;
+ Q_INVOKABLE void setDockStyle(int style);
+
Q_INVOKABLE void setGenericFontFamily(const QString &name);
Q_INVOKABLE void setFixedFontFamily(const QString &name);
@@ -78,6 +82,7 @@ signals:
void dockIconSizeChanged();
void dockDirectionChanged();
void dockVisibilityChanged();
+ void dockStyleChanged();
void fontPointSizeChanged();
void dimsWallpaperChanged();
void devicePixelRatioChanged();
@@ -94,6 +99,7 @@ private:
int m_dockIconSize;
int m_dockDirection;
int m_dockVisibility;
+ int m_dockStyle;
int m_fontPointSize;
bool m_systemEffects;
diff --git a/src/images/dock_straight.svg b/src/images/dock_straight.svg
new file mode 100644
index 0000000..3bb9606
--- /dev/null
+++ b/src/images/dock_straight.svg
@@ -0,0 +1,25 @@
+
+
diff --git a/src/qml/Battery/BatteryItem.qml b/src/qml/Battery/BatteryItem.qml
index b5f20d6..875e19b 100644
--- a/src/qml/Battery/BatteryItem.qml
+++ b/src/qml/Battery/BatteryItem.qml
@@ -62,6 +62,7 @@ Item {
opacity: 1
gradient: Gradient {
+ orientation: Gradient.Horizontal
GradientStop { position: 0.0; color: Qt.rgba(FishUI.Theme.highlightColor.r,
FishUI.Theme.highlightColor.g,
FishUI.Theme.highlightColor.b, 1) }
diff --git a/src/qml/DateTime/TimeZoneDialog.qml b/src/qml/DateTime/TimeZoneDialog.qml
index 57807f4..0a226db 100644
--- a/src/qml/DateTime/TimeZoneDialog.qml
+++ b/src/qml/DateTime/TimeZoneDialog.qml
@@ -32,6 +32,7 @@ FishUI.Window {
visible: false
flags: Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint
+ background.color: FishUI.Theme.secondBackgroundColor
background.opacity: control.compositing ? 0.5 : 1.0
contentTopMargin: 0
diff --git a/src/qml/Dock/Main.qml b/src/qml/Dock/Main.qml
index 1f55e26..2f0417a 100644
--- a/src/qml/Dock/Main.qml
+++ b/src/qml/Dock/Main.qml
@@ -40,13 +40,38 @@ ItemPage {
anchors.fill: parent
spacing: FishUI.Units.largeSpacing * 2
+ RoundedItem {
+ Label {
+ text: qsTr("Style")
+ color: FishUI.Theme.disabledTextColor
+ }
+
+ RowLayout {
+ spacing: FishUI.Units.largeSpacing * 2
+
+ IconCheckBox {
+ source: "qrc:/images/dock_bottom.svg"
+ text: qsTr("Round")
+ checked: appearance.dockStyle === 0
+ onClicked: appearance.setDockStyle(0)
+ }
+
+ IconCheckBox {
+ source: "qrc:/images/dock_straight.svg"
+ text: qsTr("Straight")
+ checked: appearance.dockStyle === 1
+ onClicked: appearance.setDockStyle(1)
+ }
+ }
+ }
+
+ // position
RoundedItem {
Label {
text: qsTr("Position on screen")
color: FishUI.Theme.disabledTextColor
}
- // Dock
RowLayout {
spacing: FishUI.Units.largeSpacing * 2
diff --git a/src/qml/RoundedItem.qml b/src/qml/RoundedItem.qml
index 2414b1e..7aede0e 100644
--- a/src/qml/RoundedItem.qml
+++ b/src/qml/RoundedItem.qml
@@ -31,6 +31,13 @@ Rectangle {
color: FishUI.Theme.secondBackgroundColor
radius: FishUI.Theme.mediumRadius
+ Behavior on color {
+ ColorAnimation {
+ duration: 200
+ easing.type: Easing.Linear
+ }
+ }
+
implicitHeight: _mainLayout.implicitHeight +
_mainLayout.anchors.topMargin +
_mainLayout.anchors.bottomMargin
diff --git a/src/resources.qrc b/src/resources.qrc
index d3c6578..211142b 100644
--- a/src/resources.qrc
+++ b/src/resources.qrc
@@ -119,5 +119,6 @@
qml/Touchpad/Main.qml
images/sidebar/dark/touchpad.svg
images/logo.png
+ images/dock_straight.svg
diff --git a/translations/en_US.ts b/translations/en_US.ts
index 577fae7..0fc5d29 100644
--- a/translations/en_US.ts
+++ b/translations/en_US.ts
@@ -76,37 +76,37 @@
About
-
+
Built on %1
Built on %1
-
+
System Version
System Version
-
+
System Type
System Type
-
+
Kernel Version
Kernel Version
-
+
Processor
Processor
-
+
RAM
RAM
-
+
Internal Storage
Internal Storage
@@ -192,25 +192,25 @@
-
+
Small
-
+
Medium
-
+
Large
-
+
Huge
@@ -251,52 +251,52 @@
-
+
History
-
+
W
-
+
Health
-
+
Poor
-
+
Normal
-
+
Excellent
-
+
Last Charged to
-
+
Maximum Capacity
-
+
Show percentage in status bar
-
+
No battery found
@@ -316,32 +316,32 @@
-
+
Screen Name
-
+
Resolution
-
+
Refresh rate
-
+
Rotation
-
+
Enabled
-
+
Scale
@@ -352,46 +352,61 @@
+ Style
+
+
+
+
+ Round
+
+
+
+
+ Straight
+
+
+
+
Position on screen
-
+
Left
-
+
Bottom
-
+
Right
-
+
Size
-
+
Display mode
-
+
Always show
-
+
Always hide
-
+
Smart hide
@@ -710,12 +725,12 @@
TimeZoneDialog
-
+
Cancel
Cancel
-
+
Set
@@ -723,17 +738,17 @@
UserDelegateItem
-
+
Currently logged
-
+
Automatic login
-
+
Delete this user
diff --git a/translations/zh_CN.ts b/translations/zh_CN.ts
index 68c906b..5f85574 100644
--- a/translations/zh_CN.ts
+++ b/translations/zh_CN.ts
@@ -76,37 +76,37 @@
关于
-
+
Built on %1
构建在 %1 上
-
+
System Version
系统版本
-
+
System Type
系统类型
-
+
Kernel Version
内核版本
-
+
Processor
处理器
-
+
RAM
内存大小
-
+
Internal Storage
内部存储
@@ -192,25 +192,25 @@
抗锯齿
-
+
Small
小
-
+
Medium
中
-
+
Large
大
-
+
Huge
巨大
@@ -251,52 +251,52 @@
最近7天
-
+
History
历史
-
+
W
瓦特
-
+
Health
健康
-
+
Poor
较差
-
+
Normal
正常
-
+
Excellent
极佳
-
+
Last Charged to
上一次充电至
-
+
Maximum Capacity
最大容量
-
+
Show percentage in status bar
在状态栏中显示电池百分比
-
+
No battery found
找不到电池
@@ -316,32 +316,32 @@
屏幕
-
+
Screen Name
屏幕名称
-
+
Resolution
分辨率
-
+
Refresh rate
刷新率
-
+
Rotation
方向
-
+
Enabled
已开启
-
+
Scale
缩放
@@ -356,46 +356,61 @@
+ Style
+ 样式
+
+
+
+ Round
+ 圆角
+
+
+
+ Straight
+ 直角
+
+
+
Position on screen
屏幕上的位置
-
+
Left
左侧
-
+
Bottom
底部
-
+
Right
右侧
-
+
Size
尺寸
-
+
Display mode
显示模式
-
+
Always show
总是显示
-
+
Always hide
总是隐藏
-
+
Smart hide
智能隐藏
@@ -718,12 +733,12 @@
TimeZoneDialog
-
+
Cancel
取消
-
+
Set
设置
@@ -731,17 +746,17 @@
UserDelegateItem
-
+
Currently logged
当前登录
-
+
Automatic login
自动登陆
-
+
Delete this user
删除该用户