[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: constraints and size hints
From:       Ignat Semenov <ragnarokk91 () gmail ! com>
Date:       2012-02-14 6:41:26
Message-ID: 6B17F825-4C00-4A96-BC01-7581DE65F30A () gmail ! com
[Download RAW message or body]

Well, yes, my bad. My apologies.

OK, so here are the issues:

1)I'd like to understand the relation between constraintsEvent() and sizeHint(). In \
order to achieve the correct effect for the FolderView (always $icon_size wide, \
whatever tall, centered vertically when in a horizontal panel, and vice versa in a \
vertical one), I did

a)in constraintsEvent() - setMinimumSize(Global iconSize for Panel) and then \
setAspectRation(constrainedSquare) b)in sizeHint() - for PreferredSize, return Global \
iconSize for Panel.

I looked it up in the Trash widget, which behaves like I've described above, and \
indeed, the FW icon in the panel started to behave identically.

Now

a)Do I need to set the size in constraintsEvent for the FormFactor change?
b)Do I need to set a size in sizeHint if constraintsEvent already has a \
setMinimumSize? c)Why Is setMinimumSize required? Is it because the panel is trying \
to shrink the widget horizontally to the very minimum (if in a horizontal panel)?

Remember - FW is not a PopupApplet, it is represented by a manually managed \
Plasma::IconWidget when in a panel.

Now for some reason, the same code does not make Kickoff, the Tabbed version (which \
inherits popupApplet) behave identically, remaining narrow and tall in the panel. \
What is worse, it does not repaint on panel resize! There even is a bug somewhere \
complaining about that issue. Maybe there is a call that inhibits repaints somewhere?

Best regards,
Ignat Semenov
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic