Improve UI

pull/11/head
cutefishd 5 years ago
parent 3c61f2ae7c
commit 2282ab14cc

@ -36,6 +36,10 @@ ItemPage {
rightPadding: FishUI.Units.largeSpacing * 2 rightPadding: FishUI.Units.largeSpacing * 2
} }
Item {
height: FishUI.Units.largeSpacing
}
// Label { // Label {
// text: qsTr("Built on ") + about.prettyProductName // text: qsTr("Built on ") + about.prettyProductName
// Layout.alignment: Qt.AlignTop | Qt.AlignHCenter // Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
@ -43,6 +47,7 @@ ItemPage {
// color: FishUI.Theme.disabledTextColor // color: FishUI.Theme.disabledTextColor
// } // }
RoundedItem {
StandardItem { StandardItem {
key: qsTr("System Version") key: qsTr("System Version")
value: "0.2" value: "0.2"
@ -74,4 +79,5 @@ ItemPage {
} }
} }
} }
}
} }

@ -32,6 +32,8 @@ ItemPage {
id: layout id: layout
anchors.fill: parent anchors.fill: parent
RoundedItem {
ListView { ListView {
id: _userView id: _userView
model: userModel model: userModel
@ -72,4 +74,5 @@ ItemPage {
} }
} }
} }
}
} }

@ -47,7 +47,9 @@ ItemPage {
id: layout id: layout
anchors.fill: parent anchors.fill: parent
anchors.bottomMargin: FishUI.Units.largeSpacing anchors.bottomMargin: FishUI.Units.largeSpacing
spacing: FishUI.Units.largeSpacing * 2
RoundedItem {
Label { Label {
text: qsTr("Theme") text: qsTr("Theme")
color: FishUI.Theme.disabledTextColor color: FishUI.Theme.disabledTextColor
@ -97,9 +99,9 @@ ItemPage {
onCheckedChanged: appearance.setDimsWallpaper(checked) onCheckedChanged: appearance.setDimsWallpaper(checked)
} }
} }
}
HorizontalDivider {} RoundedItem {
Label { Label {
text: qsTr("Accent color") text: qsTr("Accent color")
color: FishUI.Theme.disabledTextColor color: FishUI.Theme.disabledTextColor
@ -175,9 +177,9 @@ ItemPage {
} }
} }
} }
}
HorizontalDivider {} RoundedItem {
// Font // Font
Label { Label {
text: qsTr("Font") text: qsTr("Font")
@ -278,6 +280,7 @@ ItemPage {
} }
} }
} }
}
Item { Item {
Layout.fillHeight: true Layout.fillHeight: true

@ -44,7 +44,7 @@ ItemPage {
ColumnLayout { ColumnLayout {
id: layout id: layout
anchors.fill: parent anchors.fill: parent
spacing: FishUI.Units.largeSpacing spacing: FishUI.Units.largeSpacing * 2
// Battery Info // Battery Info
BatteryItem { BatteryItem {
@ -98,10 +98,7 @@ ItemPage {
} }
} }
Item { RoundedItem {
height: FishUI.Units.largeSpacing
}
Label { Label {
text: qsTr("History") text: qsTr("History")
color: FishUI.Theme.disabledTextColor color: FishUI.Theme.disabledTextColor
@ -146,11 +143,9 @@ ItemPage {
yStep: batteryPage.historyType === BatteryHistoryModel.RateType ? 10 : 20 yStep: batteryPage.historyType === BatteryHistoryModel.RateType ? 10 : 20
visible: history.count > 1 visible: history.count > 1
} }
Item {
height: FishUI.Units.smallSpacing
} }
RoundedItem {
StandardItem { StandardItem {
key: qsTr("Last Charged to") + " " + battery.lastChargedPercent + "%" key: qsTr("Last Charged to") + " " + battery.lastChargedPercent + "%"
value: battery.lastChargedTime value: battery.lastChargedTime
@ -162,6 +157,11 @@ ItemPage {
value: battery.capacity + "%" value: battery.capacity + "%"
} }
} }
Item {
height: FishUI.Units.largeSpacing
}
}
} }
Label { Label {

@ -35,6 +35,10 @@ ItemPage {
ColumnLayout { ColumnLayout {
id: layout id: layout
anchors.fill: parent anchors.fill: parent
spacing: FishUI.Units.largeSpacing * 2
RoundedItem {
Layout.fillWidth: true
Label { Label {
text: qsTr("Brightness") text: qsTr("Brightness")
@ -75,14 +79,11 @@ ItemPage {
} }
Item { Item {
height: FishUI.Units.largeSpacing height: FishUI.Units.smallSpacing
visible: brightness.enabled
} }
HorizontalDivider {
visible: brightness.enabled
} }
RoundedItem {
Label { Label {
text: qsTr("Screen") text: qsTr("Screen")
color: FishUI.Theme.disabledTextColor color: FishUI.Theme.disabledTextColor
@ -211,9 +212,9 @@ ItemPage {
interactive: true interactive: true
visible: count > 1 visible: count > 1
} }
}
HorizontalDivider { } RoundedItem {
Label { Label {
text: qsTr("Scale") text: qsTr("Scale")
color: FishUI.Theme.disabledTextColor color: FishUI.Theme.disabledTextColor
@ -287,6 +288,7 @@ ItemPage {
appearance.setDevicePixelRatio(value) appearance.setDevicePixelRatio(value)
} }
} }
}
Item { Item {
Layout.fillHeight: true Layout.fillHeight: true

@ -18,7 +18,9 @@ ItemPage {
ColumnLayout { ColumnLayout {
id: layout id: layout
anchors.fill: parent anchors.fill: parent
spacing: FishUI.Units.largeSpacing * 2
RoundedItem {
// Dock // Dock
Label { Label {
text: qsTr("Position on screen") text: qsTr("Position on screen")
@ -50,9 +52,9 @@ ItemPage {
onClicked: appearance.setDockDirection(2) onClicked: appearance.setDockDirection(2)
} }
} }
}
HorizontalDivider {} RoundedItem {
Label { Label {
text: qsTr("Size") text: qsTr("Size")
color: FishUI.Theme.disabledTextColor color: FishUI.Theme.disabledTextColor
@ -116,6 +118,7 @@ ItemPage {
appearance.setDockIconSize(iconSize) appearance.setDockIconSize(iconSize)
} }
} }
}
Item { Item {
Layout.fillHeight: true Layout.fillHeight: true

@ -54,9 +54,10 @@ Item {
ListView { ListView {
id: wirelessView id: wirelessView
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: itemHeight * count Layout.preferredHeight: itemHeight * count + ((count - 1) * FishUI.Units.smallSpacing)
clip: true clip: true
model: appletProxyModel model: appletProxyModel
spacing: FishUI.Units.smallSpacing
interactive: false interactive: false
visible: enabledConnections.wirelessEnabled visible: enabledConnections.wirelessEnabled

@ -97,10 +97,12 @@ ItemPage {
visible: wiredView.visible && enabledConnections.wirelessHwEnabled visible: wiredView.visible && enabledConnections.wirelessHwEnabled
} }
RoundedItem {
WifiView { WifiView {
Layout.fillWidth: true Layout.fillWidth: true
visible: enabledConnections.wirelessHwEnabled visible: enabledConnections.wirelessHwEnabled
} }
} }
} }
}
} }

@ -0,0 +1,24 @@
import QtQuick 2.12
import QtQuick.Layouts 1.12
import FishUI 1.0 as FishUI
Rectangle {
Layout.fillWidth: true
default property alias content : _mainLayout.data
color: FishUI.Theme.darkMode ? "#363636" : "#FFFFFF"
radius: FishUI.Theme.mediumRadius
implicitHeight: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 2
ColumnLayout {
id: _mainLayout
anchors.fill: parent
anchors.leftMargin: FishUI.Units.largeSpacing * 1.5
anchors.rightMargin: FishUI.Units.largeSpacing * 1.5
anchors.topMargin: FishUI.Units.largeSpacing
anchors.bottomMargin: FishUI.Units.largeSpacing
}
}

@ -15,7 +15,7 @@ Item {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: FishUI.Theme.secondBackgroundColor color: FishUI.Theme.backgroundColor
Behavior on color { Behavior on color {
ColorAnimation { ColorAnimation {

@ -16,6 +16,9 @@ FishUI.Window {
minimumHeight: 600 minimumHeight: 600
headerBarHeight: 50 headerBarHeight: 50
backgroundColor: FishUI.Theme.darkMode ? Qt.rgba(38 / 255, 38 / 255, 38 / 255, 255)
: Qt.rgba(237 / 255, 237 / 255, 242 / 255, 255)
headerBar: Item { headerBar: Item {
Rectangle { Rectangle {
id: leftArea id: leftArea
@ -23,7 +26,7 @@ FishUI.Window {
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
implicitWidth: sideBar.width implicitWidth: sideBar.width
color: FishUI.Theme.secondBackgroundColor color: FishUI.Theme.backgroundColor
Behavior on color { Behavior on color {
ColorAnimation { ColorAnimation {

@ -86,5 +86,6 @@
<file>qml/NetworkPage/WifiItem.qml</file> <file>qml/NetworkPage/WifiItem.qml</file>
<file>qml/NetworkPage/WirelessDetailsDialog.qml</file> <file>qml/NetworkPage/WirelessDetailsDialog.qml</file>
<file>qml/NetworkPage/WiredItem.qml</file> <file>qml/NetworkPage/WiredItem.qml</file>
<file>qml/RoundedItem.qml</file>
</qresource> </qresource>
</RCC> </RCC>

Loading…
Cancel
Save