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 { | ||
mart: would be nice to have this disabled when on intro page.
the systemsettings context property… | |||||
44 | id: menuButton | 44 | id: showIntroPageButton | ||
45 | icon.name: "application-menu" | 45 | icon.name: "go-home" | ||
46 | checkable: true | | |||
47 | checked: systemsettings.actionMenuVisible | | |||
48 | Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | 46 | Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | ||
49 | Layout.maximumHeight: width | 47 | Layout.maximumHeight: width | ||
50 | Keys.onBacktabPressed: { | 48 | Keys.onBacktabPressed: { | ||
51 | root.focusPreviousRequest() | 49 | root.focusPreviousRequest() | ||
52 | } | 50 | } | ||
53 | onClicked: systemsettings.showActionMenu(mapToGlobal(0, height)) | 51 | onClicked: systemsettings.showIntroPage(); | ||
54 | 52 | | |||
55 | QQC2.ToolTip { | 53 | QQC2.ToolTip { | ||
56 | text: i18n("Show menu") | 54 | text: i18n("Show intro page") | ||
57 | } | 55 | } | ||
58 | } | 56 | } | ||
59 | 57 | | |||
60 | Kirigami.SearchField { | 58 | Kirigami.SearchField { | ||
61 | id: searchField | 59 | id: searchField | ||
62 | focus: true | 60 | focus: true | ||
63 | Layout.minimumHeight: Layout.maximumHeight | 61 | Layout.minimumHeight: Layout.maximumHeight | ||
64 | Layout.maximumHeight: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | 62 | Layout.maximumHeight: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | ||
65 | Layout.fillWidth: true | 63 | Layout.fillWidth: true | ||
66 | onTextChanged: { | 64 | onTextChanged: { | ||
67 | systemsettings.categoryModel.filterRegExp = text; | 65 | systemsettings.categoryModel.filterRegExp = text; | ||
68 | } | 66 | } | ||
69 | } | 67 | } | ||
68 | | ||||
69 | QQC2.ToolButton { | ||||
70 | id: menuButton | ||||
71 | 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… | |||||
72 | checkable: true | ||||
73 | checked: systemsettings.actionMenuVisible | ||||
74 | Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 | ||||
75 | Layout.maximumHeight: width | ||||
76 | Keys.onBacktabPressed: { | ||||
77 | root.focusPreviousRequest() | ||||
78 | } | ||||
79 | onClicked: systemsettings.showActionMenu(mapToGlobal(0, height)) | ||||
80 | | ||||
81 | QQC2.ToolTip { | ||||
82 | text: i18n("Show menu") | ||||
83 | } | ||||
84 | } | ||||
70 | } | 85 | } | ||
71 | Kirigami.Separator { | 86 | Kirigami.Separator { | ||
72 | anchors { | 87 | anchors { | ||
73 | left: parent.left | 88 | left: parent.left | ||
74 | right: parent.right | 89 | right: parent.right | ||
75 | top: parent.bottom | 90 | top: parent.bottom | ||
76 | } | 91 | } | ||
77 | } | 92 | } | ||
▲ 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