[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/scriptengines/google_gadgets
From: Tiger Dong <idlecat511 () gmail ! com>
Date: 2008-11-29 13:10:49
Message-ID: 1227964249.193190.14535.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 890463 by tdong:
[GGL] Set initial minimized state of gadget on panel correctly.
M +16 -5 panel_decorator.cpp
--- trunk/KDE/kdebase/workspace/plasma/scriptengines/google_gadgets/panel_decorator.cpp #890462:890463
@@ -159,6 +159,16 @@
void PanelDecorator::setVertical() {
SetAllowYMargin(false);
SetAllowXMargin(true);
+
+ // Gadget on vertical panel is not minimized by default
+ Variant vertical_minimized = GetOption("vertical_minimized");
+ if (vertical_minimized.type() != Variant::TYPE_BOOL ||
+ !VariantValue<bool>()(vertical_minimized)) {
+ SetMinimized(false);
+ } else {
+ SetMinimized(true);
+ }
+
bool border = !IsMinimized();
SetResizeBorderVisible(false, false, border, false);
d->vertical_ = true;
@@ -168,12 +178,13 @@
SetAllowYMargin(true);
SetAllowXMargin(false);
- // If gadget is added to horizontal panel for the first time, it should be
- // set to minimized.
- Variant first_horizontal = GetOption("first_horizontal");
- if (first_horizontal.type() != Variant::TYPE_BOOL) {
- SetOption("first_horizontal", Variant(false));
+ // Gadget on horizontal panel is minimized by default
+ Variant horizontal_minimized = GetOption("horizontal_minimized");
+ if (horizontal_minimized.type() != Variant::TYPE_BOOL ||
+ VariantValue<bool>()(horizontal_minimized)) {
SetMinimized(true);
+ } else {
+ SetMinimized(false);
}
bool border = !IsMinimized() || IsMinimizedCaptionVisible();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic