[TabBar] Add a border property
Needs RevisionPublic

Authored by filipf on Thu, Nov 28, 12:16 AM.

Details

Reviewers
ngraham
broulik
Group Reviewers
Plasma
VDG
Summary

In the Window Decorations and Audio KCMs we use QQC2 TabBars with a frame.

The frame already draws a top border but then the tabbar draws another border, resulting in an ugly, dark, out of place line.

I added a property to the QQC2 TabBar style because I assume there might be cases where it's not used with a frame so a border is needed there.

Test Plan

Set border: false in the win deco kcm code

Before:

After:

Diff Detail

Repository
R858 Qt Quick Controls 2: Desktop Style
Branch
border-property (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 19236
Build 19254: arc lint + arc unit
filipf created this revision.Thu, Nov 28, 12:16 AM
Restricted Application added a project: Plasma. · View Herald TranscriptThu, Nov 28, 12:16 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
filipf requested review of this revision.Thu, Nov 28, 12:16 AM
filipf edited the test plan for this revision. (Show Details)Thu, Nov 28, 12:17 AM
filipf added reviewers: Plasma, VDG.
ngraham accepted this revision.Thu, Nov 28, 12:29 AM
ngraham added a subscriber: ngraham.

Feels like at this point we should just break down and create an actual TabView control all at once. :p

This revision is now accepted and ready to land.Thu, Nov 28, 12:29 AM

Feels like at this point we should just break down and create an actual TabView control all at once. :p

Yep. Unfortunately it seems we'd still need this hacky property because we'd be including TabBar.

... and the other hack lol, but it would be nice to not have to do all this all the time:

broulik requested changes to this revision.Thu, Nov 28, 7:49 AM
broulik added a subscriber: broulik.

I don't think the style is the right approach. What happens if you run the KCM with a different style, will it refuse to load?
And border is quite a non-descript property, how about frameVisible

This revision now requires changes to proceed.Thu, Nov 28, 7:49 AM

With this patch:

Fusion:

Windows 98:

Oxygen:

QtCurve:

Kvantum:

When the frame is enabled it just adds a double border with all widget styles so looks like an improvement to me. The screenshots do show we'll need to theme frame's border the same way we did for the tab bar's though.

Kai means a different QQC2 style. Which is indeed a problem with this approach, if you switch to say Material style with QT_QUICK_CONTROLS_STYLE=material the KCM will not load.

I think the better question is: Does the line serve any purpose? Or can we simply drop it completely?

filipf added a subscriber: mart.Thu, Nov 28, 11:03 AM

Ah right, it will complain about a non-existing property.

Yeah it would be good if we could just drop it. Maybe @mart knows why we have it.