Use standard buttons

pull/19/head
reionwong 4 years ago
parent d9b1d4f14e
commit 140eea1eef

@ -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;
}

@ -0,0 +1,39 @@
/*
* Copyright (C) 2021 CutefishOS Team.
*
* Author: Reion Wong <reionwong@gmail.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
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
}
}

@ -78,7 +78,7 @@ ItemPage {
}
}
Button {
StandardButton {
id: _addUserButton
text: qsTr("Add user")
Layout.fillWidth: true

@ -102,5 +102,6 @@
<file>images/sidebar/light/wlan.svg</file>
<file>images/sidebar/dark/wlan.svg</file>
<file>qml/Bluetooth/Main.qml</file>
<file>qml/StandardButton.qml</file>
</qresource>
</RCC>

Loading…
Cancel
Save