Files
proton-bridge/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/ClientListItem.qml
Xavier Michelon 86cd2437aa feat(GODT-2772): misc tweaks.
- Step description box tweaks and text color changes.
- Factored out some constants (margins and dimensions.
- Removed the ProtonStyle.px scaling which was useless as it was not applied everywhere.
2023-09-19 07:57:59 +02:00

71 lines
2.0 KiB
QML

// Copyright (c) 2023 Proton AG
// This file is part of Proton Mail Bridge.
// Proton Mail Bridge 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
// (at your option) any later version.
// Proton Mail Bridge 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 Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
import QtQml
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
Rectangle {
id: root
property ColorScheme colorScheme
property string iconSource
property string text
signal clicked
border.color: colorScheme.border_norm
border.width: 1
color: {
if (mouseArea.pressed) {
return colorScheme.interaction_default_active;
}
if (mouseArea.containsMouse) {
return colorScheme.interaction_default_hover;
}
return colorScheme.background_norm;
}
height: 68
radius: ProtonStyle.banner_radius
RowLayout {
anchors.fill: parent
anchors.margins: ProtonStyle.wizard_spacing_medium
ColorImage {
height: sourceSize.height
source: iconSource
sourceSize.height: 36
}
Label {
Layout.fillWidth: true
Layout.leftMargin: 12
colorScheme: root.colorScheme
horizontalAlignment: Text.AlignLeft
text: root.text
type: Label.LabelType.Body
verticalAlignment: Text.AlignVCenter
}
}
MouseArea {
id: mouseArea
acceptedButtons: Qt.LeftButton
anchors.fill: parent
hoverEnabled: true
onClicked: {
root.clicked();
}
}
}