Bug 120857 - Rectangular buttons in titlebar
Summary: Rectangular buttons in titlebar
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-27 11:27 UTC by Maurizio Colucci
Modified: 2012-03-10 13:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of wide buttons (8.71 KB, image/png)
2006-01-28 00:01 UTC, Knut Johansson
Details
Screenshot of wide buttons (8.71 KB, image/png)
2006-01-28 00:04 UTC, Knut Johansson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maurizio Colucci 2006-01-27 11:27:13 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Ubuntu Packages

PROPOSAL: I propose to have rectangular buttons in the titlebar, so their area can be bigger without wasting too much screen space and without enlarging the titelbar's font.

DETAILS:

I find the titlebar buttons (maximize, close...) way too small, compared to how often I click them. This is at 1024x768.

The only workaround is to increase the size of the title bar font, which indirectly causes the button size to increase. But this in turn creates other problems:

* the titlebar as a whole wastes too muchscreen space;

* the window title often does not fit in the title bar, due to the bigger font.

Therefore we have a catch 22. The solution is to allow buttons to be wider. 

They should have a width that is 3 or 4 times their heigth. See the screenshot http://librarian.launchpad.net/1521417/snapshot1.png . Though this is a Gnome screenshot, it gives the idea of what is needed.
Comment 1 Knut Johansson 2006-01-27 21:57:31 UTC
Rectangular buttons are in fact nice, but I think it should be up to the different window decoration styles to do it or not. Since this is a consideration you have to make when you design the decorations, not all decoration will look good with this.

That said, it's fun to see how the appearance in the Windows Vista betas has brought this KDE invented feature to the mainstream. The rectangular button was introduced to KDE in the pre 2.0 days by Mosfet. It was even at one point considered to become the default for 2.0. It was default for a short while, including in KDE 1.92, the third beta of KDE 2.0. That windowdecoration has evolved into the one called Laptop, and it's part of the default set of decorations on every KDE install.

You can also find other styles using the rectangular button concept among the window decorations available at http://www.kde-look.org/index.php?xcontentmode=17x18x19x20x21
Comment 2 Maurizio Colucci 2006-01-27 22:18:52 UTC
I filed this in kwin because I assumed (wrongly) that kwin did not provide support for rectangular buttons. Could someone please reassign to plastik? Otherwise in a few days I will delete this wish and file another in plastik.
Comment 3 Knut Johansson 2006-01-28 00:01:43 UTC
Created attachment 14404 [details]
Screenshot of wide buttons

Indeed Plastik could perhaps benefit from something like this, that would be
PlastikLaptop then:-) The screenshot shows 2x width applied to to min, max and
close buttons.

If you are installing from source, you could give it a quick try yourself. In
kdebase/kwin/clients/plastik/plastikclient.cpp line 131 after 'case
LM_ButtonWidth:' add the folowing:
{
    if (btn &&
(btn->type()==MinButton||btn->type()==MaxButton||btn->type()==CloseButton) ) {
	return (respectWindowState && isToolWindow() ?
Handler()->titleHeightTool() : Handler()->titleHeight())*2;
    } else {
	return (respectWindowState && isToolWindow() ?
Handler()->titleHeightTool() : Handler()->titleHeight());
    }
}

If you want to try 3x or 4x just change the *2 and recompile.
Comment 4 Knut Johansson 2006-01-28 00:04:58 UTC
Created attachment 14405 [details]
Screenshot of wide buttons

Sorry, wrong screenshot. This one has 2x.
Comment 5 Maurizio Colucci 2006-01-28 10:29:42 UTC
Thanks for the info Knut. 

There is a problem though. Your screenshots look good with that height, but, if you decrease the titlebar height (which is the  purpose), a 4x factor becomes desirable. So the scale factor can't be fixed at 2x or at anything else.

It is the _area_ that should be fixed  (depending only on the screen resolution only), and the width should be calculated with 

width = button_area / height

where

button_area = K * screen_resolution_adjust
Comment 6 Knut Johansson 2006-01-30 21:11:17 UTC
This is most likely KDE 4 stuff, KDE 3.5 being more or less string and feature frozen. So it's a wish for KDE 4. But I'm sure this is possibilities already considered for the future by the kwin decoration hackers. 

As for KDE 3, I just put a modified plastik version on kde-look. Having the possibility to manually adjust the button width from 1 to 5x.
http://www.kde-look.org/content/show.php?content=34616
Comment 7 Maurizio Colucci 2006-01-30 21:34:25 UTC
very nice job! ^_^
Comment 8 Martin Flöser 2012-03-10 13:26:25 UTC
The requested feature needs to be implemented by the specific window decoration. KWin core supports the required functionality. Unfortunately the KWin development team does not develop or maintain the specific window decorations.

Because of that the KWin development team is not able to implement this feature request. Given that KWin core supports the functionality the request is a WORKSFORME from the KWin point of view.

We want to thank you for the feature request and are sorry that this request has been open for such a long time without getting implemented.