Changeset View
Changeset View
Standalone View
Standalone View
sidebar/package/contents/ui/CategoriesPage.qml
Show All 34 Lines | 29 | header: Rectangle { | |||
---|---|---|---|---|---|
35 | RowLayout { | 35 | RowLayout { | ||
36 | id: searchLayout | 36 | id: searchLayout | ||
37 | spacing: Kirigami.Units.smallSpacing | 37 | spacing: Kirigami.Units.smallSpacing | ||
38 | anchors { | 38 | anchors { | ||
39 | fill: parent | 39 | fill: parent | ||
40 | margins: Kirigami.Units.smallSpacing | 40 | margins: Kirigami.Units.smallSpacing | ||
41 | } | 41 | } | ||
42 | 42 | | |||
43 | QQC2.ToolButton { | 43 | QQC2.ToolButton { | ||
44 | id: menuButton | 44 | id: showIntroPageButton | ||
mart: would be nice to have this disabled when on intro page.
the systemsettings context property… | |||||
45 | icon.name: "application-menu" | 45 | enabled: !systemsettings.introPageVisible | ||
46 | checkable: true | 46 | icon.name: "go-home" | ||
47 | checked: systemsettings.actionMenuVisible | | |||
48 | Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | 47 | Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | ||
49 | Layout.maximumHeight: width | 48 | Layout.maximumHeight: width | ||
50 | Keys.onBacktabPressed: { | 49 | Keys.onBacktabPressed: { | ||
51 | root.focusPreviousRequest() | 50 | root.focusPreviousRequest() | ||
52 | } | 51 | } | ||
53 | onClicked: systemsettings.showActionMenu(mapToGlobal(0, height)) | 52 | onClicked: systemsettings.introPageVisible = true | ||
54 | 53 | | |||
55 | QQC2.ToolTip { | 54 | QQC2.ToolTip { | ||
56 | text: i18n("Show menu") | 55 | text: i18n("Show intro page") | ||
57 | } | 56 | } | ||
58 | } | 57 | } | ||
59 | 58 | | |||
60 | Kirigami.SearchField { | 59 | Kirigami.SearchField { | ||
61 | id: searchField | 60 | id: searchField | ||
62 | focus: true | 61 | focus: true | ||
63 | Layout.minimumHeight: Layout.maximumHeight | 62 | Layout.minimumHeight: Layout.maximumHeight | ||
64 | Layout.maximumHeight: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | 63 | Layout.maximumHeight: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | ||
65 | Layout.fillWidth: true | 64 | Layout.fillWidth: true | ||
66 | onTextChanged: { | 65 | onTextChanged: { | ||
67 | systemsettings.categoryModel.filterRegExp = text; | 66 | systemsettings.categoryModel.filterRegExp = text; | ||
68 | } | 67 | } | ||
69 | } | 68 | } | ||
69 | | ||||
70 | QQC2.ToolButton { | ||||
71 | id: menuButton | ||||
72 | icon.name: "application-menu" | ||||
mart: I would prefer overflow-menu | |||||
This is just moving the existing item around, which already uses the hamburger menu icon (appropriately IMO). ngraham: This is just moving the existing item around, which already uses the hamburger menu icon… | |||||
73 | checkable: true | ||||
74 | checked: systemsettings.actionMenuVisible | ||||
75 | Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | ||||
76 | Layout.maximumHeight: width | ||||
77 | Keys.onBacktabPressed: { | ||||
78 | root.focusPreviousRequest() | ||||
79 | } | ||||
80 | onClicked: systemsettings.showActionMenu(mapToGlobal(0, height)) | ||||
81 | | ||||
82 | QQC2.ToolTip { | ||||
83 | text: i18n("Show menu") | ||||
84 | } | ||||
85 | } | ||||
70 | } | 86 | } | ||
71 | Kirigami.Separator { | 87 | Kirigami.Separator { | ||
72 | anchors { | 88 | anchors { | ||
73 | left: parent.left | 89 | left: parent.left | ||
74 | right: parent.right | 90 | right: parent.right | ||
75 | top: parent.bottom | 91 | top: parent.bottom | ||
76 | } | 92 | } | ||
77 | } | 93 | } | ||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |
would be nice to have this disabled when on intro page.
the systemsettings context property should expose a bool property true when the intro page is shown