Bug 215454 - Layout of pop-up window completely broken
Summary: Layout of pop-up window completely broken
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Unmaintained
Component: widget-battery (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-20 18:09 UTC by Andrey Borzenkov
Modified: 2010-12-23 14:56 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
battery widget pop-up (67.50 KB, image/png)
2009-11-20 18:10 UTC, Andrey Borzenkov
Details
battery widget in 4.3.80 (41.74 KB, image/png)
2009-12-11 07:26 UTC, Andrey Borzenkov
Details
Battery popup in 4.4 RC1 (73.21 KB, image/png)
2010-01-11 19:40 UTC, Andrey Borzenkov
Details
4.4.0 (57.70 KB, image/png)
2010-02-24 08:07 UTC, Andrew M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Borzenkov 2009-11-20 18:09:53 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

KDE 4.3.75/Qt 4.6 RC1 as shipped by Mandriva

Something happened after 4.3.73 so layout is totally broken. See attachment.
Comment 1 Andrey Borzenkov 2009-11-20 18:10:59 UTC
Created attachment 38464 [details]
battery widget pop-up
Comment 2 Dario Andres 2009-12-07 01:27:23 UTC
The widget received some polishment recently. Could you check this with the latest KDE ? Thanks
Comment 3 Andrey Borzenkov 2009-12-07 04:32:49 UTC
It is better in beta1 (4.3.80) but Battery/AC lines are still too far to the right, so right now line Battery: 1005 (charging) is partially overlapped by AC icon (flash). In Russian it will be much worse as strings tend to be longer.

I do not understand why text starts about 1/3 of width from the left side. Is it intentional?
Comment 4 Sebastian Kügler 2009-12-10 11:42:05 UTC
Hm, that looks slightly broken indeed.

It might be a bit better with the current version (again moved around the widgets a bit). Can you send me a screenshot of how it looks like in current trunk?

I'm a bit afraid that we won't be able to do much about it without losing the alignment again, as elided buttons look really bad, IMO. I'd like to have a look though.

One question, maybe it's possible to use shorter names for "sleep" resp. "hibernate"? I can neither read nor write the language used there, and it's probably also not a structural fix. This kind of text should be as short as possible though...
Comment 5 Andrey Borzenkov 2009-12-11 07:26:05 UTC
Created attachment 38980 [details]
battery widget in 4.3.80

(In reply to comment #4)
I attach how it looks in 4.3.80. Buttons layout is IMHO OK (actually it was already). It the layout of Battery/AC Adapter strings that is a bit off.
Comment 6 Sebastian Kügler 2009-12-11 12:21:55 UTC
Yep, the text overlapping the battery icon is problematic. I'll have a go at fixing this. (I know the problem is because the battery on the right is actually outside the layout.)
Comment 7 Andrey Borzenkov 2010-01-11 19:40:06 UTC
Created attachment 39786 [details]
Battery popup in 4.4 RC1

Unfortunately is not getting better :(
Comment 8 Andrew M 2010-02-24 08:07:02 UTC
Created attachment 41049 [details]
4.4.0
Comment 9 Andrew M 2010-02-24 08:11:15 UTC
Whoops, premature pressing of enter.

The text is fine now (at least for English), combo box is broken now.

The blue highlight isn't rendered around the right and bottom of the button and the menu is rendered underneath the panel. Compositing has no effect.
Comment 10 Andrew M 2010-02-24 08:15:09 UTC
Please disregard previous posts

Found bug 219873
Comment 11 Nick Shaforostoff 2010-05-20 13:27:11 UTC
confirming the bug. In Russian it is very hard to translate 'Hibernate' and 'Sleep' shortly in a way that is understandable by an average person, so currently the translation is long.

Please adjust the layout code so that it works as expected in the case when hibernate/sleep buttons taking a lot of space. (i.e. make battery icon stick to the right)

if you give me a hint to where the code is, I could try to fix it myself.
Comment 12 Sebastian Kügler 2010-05-21 00:18:59 UTC
Hi Nick,

The code is in kdebase/workspace/plasma/generic/applets/battery/battery.cpp (if I'm not mistaken as to the path).

From what I can see, the following needs to happen (if you don't get to it, don't worry, this is also handy as personal note for me ;-)):

- Sleep button needs a sensible maximum size, so the text gets elided, plus a tooltip so the user can get at the full text
- The battery in the popup should sit in an anchorlayout and be anchored to the top-right corner

Cheers, and thanks for your patience!
Comment 13 Marco Martin 2010-05-22 00:05:51 UTC
sebas: the layout of the applet change quite a lot since this report i think it can be closed?
Comment 14 Andrey Borzenkov 2010-05-22 10:34:15 UTC
Initial problem (misplaced battery icon) still remains.
Comment 15 Sebastian Kügler 2010-05-23 16:47:32 UTC
We still have the problem that some languagages cannot translate the buttons on the left in a short enough way, so the problem persists.

I'll try to improve before 4.5 comes out.
Comment 16 Sebastian Kügler 2010-12-23 14:56:27 UTC
This one's been fixed by Aurelien.