[WIP] Add "Show intro page" button to System Settings sidebar
Changes PlannedPublic

Authored by GB_2 on Mon, Aug 19, 8:18 PM.

Details

Reviewers
None
Group Reviewers
Plasma
VDG
Summary

BUG: 405956


WIP because I couldn't figure out how to reset the active sidebar selection.

Test Plan

Open System Settings and click on the "Show intro page" button.

Diff Detail

Repository
R124 System Settings
Branch
add-show-intro-page-button-to-system-settings-sidebar (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15668
Build 15686: arc lint + arc unit
GB_2 created this revision.Mon, Aug 19, 8:18 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMon, Aug 19, 8:18 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
GB_2 requested review of this revision.Mon, Aug 19, 8:18 PM
GB_2 added a subscriber: mart.Mon, Aug 19, 8:30 PM

@mart can you help here?

mart added a comment.Fri, Aug 23, 1:36 PM

when the intro page gets shown, (again binded from a bool property arriving from c++)
categoryView.currentIndex should be set to -1,
and systemsettings.activeCategory to -1 as well

sidebar/SidebarMode.cpp
425

this should be a bool property setter

sidebar/package/contents/ui/CategoriesPage.qml
43–44

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

72

I would prefer overflow-menu

mart added a comment.Fri, Aug 23, 1:37 PM

there *may* be some changes needing to be done on SidebarMode::setActiveCategory for that to work, but try to do that, then wel'll see

ngraham added inline comments.
sidebar/package/contents/ui/CategoriesPage.qml
72

This is just moving the existing item around, which already uses the hamburger menu icon (appropriately IMO).

GB_2 updated this revision to Diff 64682.Mon, Aug 26, 5:00 PM

Use a bool property setter and disable button when on intro page

GB_2 marked 2 inline comments as done.Mon, Aug 26, 5:01 PM

This is what happens when you set the current index to -1:

mart added a comment.Tue, Aug 27, 1:12 PM
In D23274#519661, @GB_2 wrote:

This is what happens when you set the current index to -1:

did you also try to set the active category to -1?

mart added a comment.Tue, Aug 27, 1:12 PM

SidebarMode::setActiveCategory may need to be modified to make it like it tough

GB_2 added a comment.Tue, Aug 27, 2:09 PM
In D23274#520127, @mart wrote:

SidebarMode::setActiveCategory may need to be modified to make it like it tough

Looks like it.

sidebar/SidebarMode.cpp
498

Yes, here.

mart added a comment.Tue, Aug 27, 3:45 PM
In D23274#520185, @GB_2 wrote:
In D23274#520127, @mart wrote:

SidebarMode::setActiveCategory may need to be modified to make it like it tough

Looks like it.

can you take a look? should be fairly simple
const int newCategoryRow = to have -1 when the passed cat is -1
also, SidebarMode::changeModule to get special casing for invalid qmodelindexes

mart added a comment.Tue, Sep 3, 10:23 AM

any updates on this?

GB_2 planned changes to this revision.Sun, Sep 8, 1:21 PM

I'll try to work more on this in the future.