mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 10:22:52 +00:00
kdeplasma-addons: disregard the size of the kolourpicker applet for layout orientation
to match the orinetation of the panel for example Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
e5755dcb77
commit
99528e7f11
1 changed files with 3 additions and 6 deletions
|
@ -305,17 +305,14 @@ void Kolourpicker::configChanged()
|
|||
void Kolourpicker::constraintsEvent(Plasma::Constraints constraints)
|
||||
{
|
||||
if (constraints & Plasma::FormFactorConstraint) {
|
||||
if (formFactor() == Plasma::Planar) {
|
||||
const Plasma::FormFactor formfactor = formFactor();
|
||||
if (formfactor == Plasma::Planar) {
|
||||
setBackgroundHints(Plasma::Applet::StandardBackground);
|
||||
} else {
|
||||
setBackgroundHints(Plasma::Applet::NoBackground);
|
||||
}
|
||||
}
|
||||
|
||||
if (constraints & Plasma::FormFactorConstraint ||
|
||||
constraints & Plasma::SizeConstraint) {
|
||||
QGraphicsLinearLayout *l = dynamic_cast<QGraphicsLinearLayout *>(layout());
|
||||
if (formFactor() == Plasma::Horizontal && size().height() < 40) {
|
||||
if (formfactor == Plasma::Horizontal) {
|
||||
l->setOrientation(Qt::Horizontal);
|
||||
} else {
|
||||
l->setOrientation(Qt::Vertical);
|
||||
|
|
Loading…
Add table
Reference in a new issue