diff --git a/src/qml/Appearance/Main.qml b/src/qml/Appearance/Main.qml index 02f8ef8..a65c62c 100644 --- a/src/qml/Appearance/Main.qml +++ b/src/qml/Appearance/Main.qml @@ -275,13 +275,13 @@ ItemPage { currentIndex: { var index = 0 - if (appearance.fontPointSize <= 10) + if (appearance.fontPointSize <= 9) index = 0 - else if (appearance.fontPointSize <= 11) + else if (appearance.fontPointSize <= 10) index = 1 - else if (appearance.fontPointSize <= 13) + else if (appearance.fontPointSize <= 12) index = 2 - else if (appearance.fontPointSize <= 16) + else if (appearance.fontPointSize <= 15) index = 3 return index @@ -292,16 +292,16 @@ ItemPage { switch (currentIndex) { case 0: - fontSize = 10 + fontSize = 9 break; case 1: - fontSize = 11 + fontSize = 10 break; case 2: - fontSize = 13 + fontSize = 12 break; case 3: - fontSize = 16 + fontSize = 15 break; } diff --git a/src/qml/StandardButton.qml b/src/qml/StandardButton.qml new file mode 100644 index 0000000..5363f84 --- /dev/null +++ b/src/qml/StandardButton.qml @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2021 CutefishOS Team. + * + * Author: Reion Wong + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import FishUI 1.0 as FishUI + +Button { + id: control + + property color backgroundColor: FishUI.Theme.darkMode ? "#363636" : "#FFFFFF" + property color hoveredColor: Qt.tint(FishUI.Theme.textColor, Qt.rgba(backgroundColor.r, + backgroundColor.g, + backgroundColor.b, 0.9)) + property color pressedColor: Qt.tint(FishUI.Theme.textColor, Qt.rgba(backgroundColor.r, + backgroundColor.g, + backgroundColor.b, 0.8)) + + background: Rectangle { + radius: FishUI.Theme.mediumRadius + color: control.pressed ? control.pressedColor : control.hovered ? control.hoveredColor : control.backgroundColor + } +} diff --git a/src/qml/User/Main.qml b/src/qml/User/Main.qml index 23e02f6..ebaefc5 100644 --- a/src/qml/User/Main.qml +++ b/src/qml/User/Main.qml @@ -78,7 +78,7 @@ ItemPage { } } - Button { + StandardButton { id: _addUserButton text: qsTr("Add user") Layout.fillWidth: true diff --git a/src/resources.qrc b/src/resources.qrc index 349a788..4a9159a 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -102,5 +102,6 @@ images/sidebar/light/wlan.svg images/sidebar/dark/wlan.svg qml/Bluetooth/Main.qml + qml/StandardButton.qml