Changeset View
Changeset View
Standalone View
Standalone View
applets/comic/package/contents/ui/configAppearance.qml
Show All 11 Lines | |||||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. | ||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.1 | 19 | import QtQuick 2.1 | ||
20 | import QtQuick.Controls 1.1 as Controls | 20 | import QtQuick.Controls 2.5 as Controls | ||
21 | import QtQuick.Layouts 1.1 as Layouts | 21 | import QtQuick.Layouts 1.1 as Layouts | ||
22 | 22 | | |||
23 | import org.kde.plasma.core 2.0 as PlasmaCore | 23 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
24 | import org.kde.kirigami 2.5 as Kirigami | ||||
24 | 25 | | |||
25 | 26 | | |||
26 | Layouts.ColumnLayout { | 27 | Kirigami.FormLayout { | ||
27 | id: root | 28 | id: root | ||
29 | anchors.left: parent.left | ||||
30 | anchors.right: parent.right | ||||
28 | 31 | | |||
29 | signal configurationChanged | 32 | signal configurationChanged | ||
30 | 33 | | |||
31 | function saveConfig() { | 34 | function saveConfig() { | ||
32 | plasmoid.nativeInterface.arrowsOnHover = showArrowsOnOver.checked; | 35 | plasmoid.nativeInterface.arrowsOnHover = showArrowsOnOver.checked; | ||
33 | plasmoid.nativeInterface.showComicTitle = showComicTitle.checked; | 36 | plasmoid.nativeInterface.showComicTitle = showComicTitle.checked; | ||
34 | plasmoid.nativeInterface.showComicIdentifier = showIdentifier.checked; | 37 | plasmoid.nativeInterface.showComicIdentifier = showIdentifier.checked; | ||
35 | plasmoid.nativeInterface.showComicAuthor = showAuthor.checked; | 38 | plasmoid.nativeInterface.showComicAuthor = showAuthor.checked; | ||
36 | plasmoid.nativeInterface.showComicUrl = showUrl.checked; | 39 | plasmoid.nativeInterface.showComicUrl = showUrl.checked; | ||
37 | 40 | | |||
38 | plasmoid.nativeInterface.saveConfig(); | 41 | plasmoid.nativeInterface.saveConfig(); | ||
39 | plasmoid.nativeInterface.configChanged(); | 42 | plasmoid.nativeInterface.configChanged(); | ||
40 | } | 43 | } | ||
41 | 44 | | |||
42 | Component.onCompleted: { | 45 | Component.onCompleted: { | ||
43 | showArrowsOnOver.checked = plasmoid.nativeInterface.arrowsOnHover; | 46 | showArrowsOnOver.checked = plasmoid.nativeInterface.arrowsOnHover; | ||
44 | showComicTitle.checked = plasmoid.nativeInterface.showComicTitle; | 47 | showComicTitle.checked = plasmoid.nativeInterface.showComicTitle; | ||
45 | showIdentifier.checked = plasmoid.nativeInterface.showComicIdentifier; | 48 | showIdentifier.checked = plasmoid.nativeInterface.showComicIdentifier; | ||
46 | showAuthor.checked = plasmoid.nativeInterface.showComicAuthor; | 49 | showAuthor.checked = plasmoid.nativeInterface.showComicAuthor; | ||
47 | showUrl.checked = plasmoid.nativeInterface.showComicUrl; | 50 | showUrl.checked = plasmoid.nativeInterface.showComicUrl; | ||
48 | } | 51 | } | ||
49 | 52 | | |||
50 | | ||||
51 | Controls.GroupBox { | | |||
52 | Layouts.Layout.fillWidth: true | | |||
53 | flat: true | | |||
54 | | ||||
55 | title: i18nc("@title:group", "Navigation") | | |||
56 | | ||||
57 | Layouts.ColumnLayout { | | |||
58 | Controls.CheckBox { | | |||
59 | id: showArrowsOnOver | | |||
60 | text: i18nc("@option:check", "Show arrows only on mouse-over") | | |||
61 | onCheckedChanged: root.configurationChanged(); | | |||
62 | } | | |||
63 | } | | |||
64 | } | | |||
65 | | ||||
66 | Controls.GroupBox { | | |||
67 | Layouts.Layout.fillWidth: true | | |||
68 | flat: true | | |||
69 | | ||||
70 | title: i18nc("@title:group", "Information") | | |||
71 | | ||||
72 | Layouts.ColumnLayout { | | |||
73 | Controls.CheckBox { | 53 | Controls.CheckBox { | ||
74 | id: showComicTitle | 54 | id: showComicTitle | ||
75 | text: i18nc("@option:check", "Show comic title") | 55 | Kirigami.FormData.label: i18nc ("Heading for showing various elements of a comic", "Show:") | ||
ngraham: Might work better with just "Show:" (and then provide some context for translators) | |||||
56 | text: i18nc("@option:check", "Comic title") | ||||
76 | onCheckedChanged: root.configurationChanged(); | 57 | onCheckedChanged: root.configurationChanged(); | ||
77 | } | 58 | } | ||
59 | | ||||
78 | Controls.CheckBox { | 60 | Controls.CheckBox { | ||
79 | id: showIdentifier | 61 | id: showIdentifier | ||
80 | text: i18nc("@option:check", "Show comic identifier") | 62 | text: i18nc("@option:check", "Comic identifier") | ||
81 | onCheckedChanged: root.configurationChanged(); | 63 | onCheckedChanged: root.configurationChanged(); | ||
82 | } | 64 | } | ||
65 | | ||||
83 | Controls.CheckBox { | 66 | Controls.CheckBox { | ||
84 | id: showAuthor | 67 | id: showAuthor | ||
85 | text: i18nc("@option:check", "Show comic author") | 68 | text: i18nc("@option:check", "Comic author") | ||
86 | onCheckedChanged: root.configurationChanged(); | 69 | onCheckedChanged: root.configurationChanged(); | ||
87 | } | 70 | } | ||
71 | | ||||
88 | Controls.CheckBox { | 72 | Controls.CheckBox { | ||
89 | id: showUrl | 73 | id: showUrl | ||
90 | text: i18nc("@option:check", "Show comic URL") | 74 | text: i18nc("@option:check", "Comic URL") | ||
91 | onCheckedChanged: root.configurationChanged(); | 75 | onCheckedChanged: root.configurationChanged(); | ||
92 | } | 76 | } | ||
77 | | ||||
78 | Item { | ||||
79 | Kirigami.FormData.isSection: true | ||||
93 | } | 80 | } | ||
81 | | ||||
82 | Controls.RadioButton { | ||||
83 | id: alwaysShowArrows | ||||
84 | Kirigami.FormData.label: i18n ("Show navigation buttons:") | ||||
85 | text: i18nc("@option:check", "Always") | ||||
86 | checked: !showArrowsOnOver.checked | ||||
87 | onCheckedChanged: root.configurationChanged(); | ||||
94 | } | 88 | } | ||
95 | 89 | | |||
96 | Item { | 90 | Controls.RadioButton { | ||
97 | Layouts.Layout.fillHeight: true | 91 | id: showArrowsOnOver | ||
92 | text: i18nc("@option:check", "Only on hover") | ||||
93 | onCheckedChanged: root.configurationChanged(); | ||||
98 | } | 94 | } | ||
99 | } | 95 | } |
Might work better with just "Show:" (and then provide some context for translators)