Changeset View
Changeset View
Standalone View
Standalone View
sidebar/package/contents/ui/CategoriesPage.qml
Show All 33 Lines | 28 | header: Rectangle { | |||
---|---|---|---|---|---|
34 | RowLayout { | 34 | RowLayout { | ||
35 | id: searchLayout | 35 | id: searchLayout | ||
36 | spacing: Kirigami.Units.smallSpacing | 36 | spacing: Kirigami.Units.smallSpacing | ||
37 | anchors { | 37 | anchors { | ||
38 | fill: parent | 38 | fill: parent | ||
39 | margins: Kirigami.Units.smallSpacing | 39 | margins: Kirigami.Units.smallSpacing | ||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | QQC2.ToolButton { | 42 | QQC2.ToolButton { | ||
43 | id: menuButton | 43 | id: showIntroPageButton | ||
mart: would be nice to have this disabled when on intro page.
the systemsettings context property… | |||||
44 | icon.name: "application-menu" | 44 | enabled: !systemsettings.introPageVisible | ||
45 | checkable: true | 45 | icon.name: "go-home" | ||
46 | checked: systemsettings.actionMenuVisible | | |||
47 | Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | 46 | Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | ||
48 | Layout.maximumHeight: width | 47 | Layout.maximumHeight: width | ||
49 | Keys.onBacktabPressed: { | 48 | Keys.onBacktabPressed: { | ||
50 | root.focusPreviousRequest() | 49 | root.focusPreviousRequest() | ||
51 | } | 50 | } | ||
52 | onClicked: systemsettings.showActionMenu(mapToGlobal(0, height)) | 51 | onClicked: systemsettings.introPageVisible = true | ||
53 | 52 | | |||
54 | QQC2.ToolTip { | 53 | QQC2.ToolTip { | ||
55 | text: i18n("Show menu") | 54 | text: i18n("Show intro page") | ||
56 | } | 55 | } | ||
57 | } | 56 | } | ||
58 | 57 | | |||
59 | Kirigami.SearchField { | 58 | Kirigami.SearchField { | ||
60 | id: searchField | 59 | id: searchField | ||
61 | focus: true | 60 | focus: true | ||
62 | Layout.minimumHeight: Layout.maximumHeight | 61 | Layout.minimumHeight: Layout.maximumHeight | ||
63 | Layout.maximumHeight: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | 62 | Layout.maximumHeight: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | ||
64 | Layout.fillWidth: true | 63 | Layout.fillWidth: true | ||
65 | onTextChanged: { | 64 | onTextChanged: { | ||
66 | systemsettings.categoryModel.filterRegExp = text; | 65 | systemsettings.categoryModel.filterRegExp = text; | ||
67 | } | 66 | } | ||
68 | KeyNavigation.tab: categoryView | 67 | KeyNavigation.tab: categoryView | ||
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 76 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