NCRadioButton => RadioButton.

Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
Camila Ayres 2024-08-29 20:39:00 +02:00 committed by Matthieu Gallien
parent 0ca6837b34
commit 49c822402b
No known key found for this signature in database
GPG key ID: 7D0F74F05C22F553
3 changed files with 3 additions and 56 deletions

View file

@ -55,7 +55,6 @@
<file>src/gui/tray/EnforcedPlainTextLabel.qml</file>
<file>theme/Style/Style.qml</file>
<file>theme/Style/qmldir</file>
<file>src/gui/filedetails/NCRadioButton.qml</file>
<file>src/gui/tray/ListItemLineAndSubline.qml</file>
<file>src/gui/tray/TrayFoldersMenuButton.qml</file>
<file>src/gui/tray/TrayFolderListItem.qml</file>

View file

@ -1,46 +0,0 @@
/*
* Copyright (C) by Oleksandr Zolotov <alex@nextcloud.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 2 of the License, or
* (at your option) 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.
*/
import QtQuick 2.15
import QtQuick.Controls 2.15
import Style 1.0
RadioButton {
id: root
property int indicatorItemWidth: Style.radioButtonIndicatorSize
property int indicatorItemHeight: Style.radioButtonIndicatorSize
property int radius: Style.radioButtonCustomRadius
// TODO: the current style does not support customization of this control
indicator: Rectangle {
implicitWidth: root.indicatorItemWidth
implicitHeight: root.indicatorItemHeight
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: Style.radioButtonCustomMarginLeftOuter
radius: root.radius
color: palette.base
border.color: palette.dark
border.width: Style.normalBorderWidth
Rectangle {
anchors.fill: parent
visible: root.checked
color: palette.buttonText
radius: root.radius
anchors.margins: Style.radioButtonCustomMarginLeftInner
}
}
}

View file

@ -346,43 +346,37 @@ Page {
id: permissionModeRadioButtonsGroup
}
NCRadioButton {
RadioButton {
readonly property int permissionMode: ShareModel.ModeViewOnly
Layout.fillWidth: true
ButtonGroup.group: permissionModeRadioButtonsGroup
enabled: !root.isSharePermissionChangeInProgress
checked: root.currentPermissionMode === permissionMode
text: qsTr("View only")
indicatorItemWidth: scrollContentsColumn.indicatorItemWidth
indicatorItemHeight: scrollContentsColumn.indicatorItemWidth
spacing: scrollContentsColumn.indicatorSpacing
padding: scrollContentsColumn.itemPadding
onClicked: root.permissionModeChanged(permissionMode)
}
NCRadioButton {
RadioButton {
readonly property int permissionMode: ShareModel.ModeUploadAndEditing
Layout.fillWidth: true
ButtonGroup.group: permissionModeRadioButtonsGroup
enabled: !root.isSharePermissionChangeInProgress
checked: root.currentPermissionMode === permissionMode
text: qsTr("Allow upload and editing")
indicatorItemWidth: scrollContentsColumn.indicatorItemWidth
indicatorItemHeight: scrollContentsColumn.indicatorItemWidth
spacing: scrollContentsColumn.indicatorSpacing
padding: scrollContentsColumn.itemPadding
onClicked: root.permissionModeChanged(permissionMode)
}
NCRadioButton {
RadioButton {
readonly property int permissionMode: ShareModel.ModeFileDropOnly
Layout.fillWidth: true
ButtonGroup.group: permissionModeRadioButtonsGroup
enabled: !root.isSharePermissionChangeInProgress
checked: root.currentPermissionMode === permissionMode
text: qsTr("File drop (upload only)")
indicatorItemWidth: scrollContentsColumn.indicatorItemWidth
indicatorItemHeight: scrollContentsColumn.indicatorItemWidth
spacing: scrollContentsColumn.indicatorSpacing
padding: scrollContentsColumn.itemPadding
onClicked: root.permissionModeChanged(permissionMode)