Top of windows too tall and apparently non-adjustable in kde 5.

Duncan 1i5t5.duncan at cox.net
Mon Apr 30 07:33:02 BST 2018


A. F. Cano posted on Sun, 29 Apr 2018 22:49:47 -0400 as excerpted:

> On Sun, Apr 29, 2018 at 06:49:33AM +0000, Duncan wrote:
>> Your reply reminded me...
>> 
>> Depending on the selected window decoration, icon-button size may
>> determine titlebar height.
>> 
>> The breeze window decoration does have a button size option[1], and
>> when I select it[2], and while setting it "tiny" doesn't seem to do
>> anything,
> 
> Mmm...  Where would this button size option be? The "Buttons" tab in
> "Window Decorations" only has drag and drop to add/remove buttons.  This
> is true of all the themes I've tried so far: Plastik, Breeze, Air Oxygen
> and blacksquare.  I've managed to remove the round button on the left of
> the title bar (in blacksquare) by dragging it out and I can't put any
> buttons in it. Clicking on "Defaults" only switches back to Breeze.

Keeping in mind that the plasma system settings UI is undergoing some 
changes ATM[1], and I'm running the live-git version so what I see and 
describe might not /exactly/ match what you see...

In Window Decorations I see two tabs, theme and buttons.

On the theme/first tab each installed/available windeco theme is listed.  
I know the UI has changed a bit here and can't remember the old one 
exactly, but on the new one, there's configuration buttons for each theme 
directly in the theme's visual mockup, so it's quite apparent each of 
these buttons ONLY configures that specific windeco, not the others.  As 
I said I don't remember the old UI exactly, but I /think/ it had only one 
configure-theme button, located near the top, with a dropdown-selector 
for the windeco.

In any case, however the UI is laid out, the idea is each windeco has its 
own separate configuration dialog.  The default breeze windeco and the 
kde4 default oxygen windeco each have somewhat complicated multi-tab 
config dialogs, while plastik's dialog is rather less complicated, and 
most of the others including blacksquare only have a single option in 
their dialog, the button size option of interest here.

IOW, all windeco config dialogs have at least the button size option, 
with plastik's dialog having a couple other options as well, and breeze 
and oxygen's dialog having so many options each that the dialog has 
multiple tabs.

But it's this single button size option that all windecos have that's at 
interest here.  Most windecos appear to have a hard-coded minimum height 
configured, with button sizes below that not shrinking the titlebar 
further, but those above it increasing the titlebar size.

And while most windecos seem to have that hard-coded minimum height set 
to normal/medium, so smaller button sizes don't reduce the titlebar 
height further but larger ones increase it...

For blacksquare at least, either it has no such hard-coded minimum, or 
that minimum is set to the smallest "tiny" button size.  So it's possible 
to get blacksquare's titlebar height far shorter than the others, because 
it continues shrinking with the tiny button size, while most won't shrink 
below the height at normal/medium button size, even when set to tiny!


As for that button you removed, that configured on the second/buttons 
tab, and the setting should apply no matter which windeco is chosen.  You 
should be able to drag buttons between the displayed "fake" titlebar and 
the display of all possible buttons below it.  To get that button back, 
then, you  /should/ be able to simply drag it from the lower icon 
section, back up to the fake titlebar, which after hitting apply should 
have it show up on the real titlebars as well (tho some buttons won't 
show up all the time, context help, for instance, only shows up in plasma/
kde/qt-based app windows with context help available).

Also note that on this fake titlebar, you can reorder buttons as well as 
move them from one side to the other.

> Yea for blacksquare! It has the narrowest title bar I've found so far.
> Too bad it cannot be configured by color, but then it wouldn't be
> /black/square :-)
> 
>> short.  The only config option it has is button size, but with that set
>> to tiny, it really does reduce the titlebar height from normal, giving
>> me one of the shortest titlebars of any I've tried, which in turn means
>> more room for actual window content. =:^)
> 
> That's the idea, but where is this option?  From the package manager I
> gather I have kde-plasma-desktop 5:92 (Debian 9.4) and from the "help"
> menu in konsole I see that the KDE Frameworks is 5.28, Qt 5.7.1.  Maybe
> in this version the button size doesn't exist yet.

I believe it exists, but it's in the individual windeco configuration 
dialog, and the button for that has moved around a bit recently, as I 
explained above.  Unfortunately that means I can't tell you exactly where 
to find it on your version, but it should be there.


>> The effect is enough that if I were seriously put off by the color or
>> other elements of the windeco, I might actually try hand-editing its
>> config files to change them, or alternatively, try hand-editing other
>> windeco's files to get the shortness of BlackSquare with tiny buttons,
>> but as it happens, I'm OK enough with the color and etc not to bother.
> 
> In what config files could I find these options?

Here I'm talking about the hard-coded options that are part of the windeco 
theme itself.  Basically I'd hand-edit the windeco theme itself, creating 
a custom windeco different from whatever was originally shipped.  For 
windecos downloaded from the kde/plasma store, these would be the windeco 
files as found in your user config where they were placed by the 
download.  For "native" decos shipped with plasma itself, they'd be in 
the system location.

For windecos I've not actually looked into the specifics, tho I have hand-
edited other elements like the colors and opacity of various "desktop 
themes" I've downloaded before, when they were almost, but not quite what 
I wanted.  This was in the kde4 era, but the same general idea should 
apply today, to the windeco themes.

Actually looking at it now, it appears the blacksquare theme is aurorae-
based[2], with the archive as downloaded unpacking at installation to (my 
path is customized via environmental var settings but I /think/ this is 
the generic one...) ~/.config/share/aurorae/themes/BlackSquare .  There's 
several svg[3] images as well as a metadata.desktop file and 
BlackSquarerc, a text-based rc/config file.

By hand-editing that BlackSquarerc file and/or switching out the svgs, I 
could change elements of the windeco, effectively forking it from what 
was originally shipped, customizing it to my liking.

If I wanted (and the license on the original blacksquare windeco 
permitted it, I'd obviously need to verify that first), I could upload my 
tweaked version back to the kde/plasma store and/or kdelook.

Of course I could instead alter some other windeco, changing whatever 
setting it had, presumably TitleHeight in this case, if it were otherwise 
closer to what I wanted than blacksquare was, and thus it was easier to 
alter a setting or two from it, than more settings in blacksquare.

But as I said, while not "perfect", blacksquare is "good enough" that 
I've not bothered, and I actually looked up more of the details for this 
post than I knew before.  But it's easy enough to change the otherwise 
"hardcoded" options, if I were sufficiently motivated by dislike of some 
specific setting or other...

---
[1] The plasma guys are rewriting the plasma systemsettings UI using 
kirigami, the mobile/convergent widget/UI framework first used for plasma-
mobile, and qtscript, replacing the older direct C++-coded kcm/
kcontrolpanel-modules.  The new UI handles both touch and conventional 
mouse input and is targeted at plasma-wayland first, while still 
supporting plasma-x11 without as much porting effort, basically the 
reverse of the old way which obviously targeted x11 first and has to be 
ported to wayland.

[2] Aurora:  I'm not a windeco theme author and don't know the specifics, 
but based on what I've gathered from author comments when browsing 
windecos on the kde/plasma store and the old kde4-era kdelook website, 
plasma has several windeco "engines" available, including the complicated 
ones used for breeze and oxygen, and aurora, a much simpler windeco 
engine designed to make customized themes easy!  Based on my browsing, 
most of the custom windeco themes in the plasma store are in fact aurorae-
based, with some specifically mentioning that fact while others don't.  
That's not incredibly surprising if as I've gathered, aurorae was 
specifically designed to allow users to design and ship their own custom 
windeco themes.  I /think/ there's actually another windeco "engine" 
available in the store as well, a bit more complex than aurora but 
nothing like the complexity of the breeze/oxygen engines, with a few 
themes that are designed for it and at least partially broken without it, 
as I've tried some of those windecos without having that engine and found 
they /were/ broken, but I'm not sure exactly where that engine is or how 
many windecos are available for it as I only got the broken-without-it 
windecos by accident, not fully understanding what I was missing that I 
needed.

[3] SVG: Scalable vector graphics.  These allow images to scale far more 
cleanly than raster/bitmap images.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman





More information about the kde mailing list