[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [oxygen-gtk/pixelhunting] src/animations: Resize combobox list when ypad has been tweaked
From: Ruslan Kabatsayev <b7.10110111 () gmail ! com>
Date: 2012-02-24 16:03:44
Message-ID: 20120224160344.B5567A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 828e94f593bdce24f1e9a9063adddb7f366d02c2 by Ruslan Kabatsayev.
Committed on 24/02/2012 at 17:04.
Pushed by kabatsayev into branch 'pixelhunting'.
Resize combobox list when ypad has been tweaked
M +14 -3 src/animations/oxygenanimations.cpp
http://commits.kde.org/oxygen-gtk/828e94f593bdce24f1e9a9063adddb7f366d02c2
diff --git a/src/animations/oxygenanimations.cpp b/src/animations/oxygenanimations.cpp
index c57abaa..b6fa695 100644
--- a/src/animations/oxygenanimations.cpp
+++ b/src/animations/oxygenanimations.cpp
@@ -387,12 +387,23 @@ namespace Oxygen
}
g_list_free(columns);
- if( Gtk::gtk_combobox_is_tree_view(widget) && resizedAnything )
+ if( Gtk::gtk_combobox_is_tree_view(widget) )
{
- // TODO: resize combobox list
+ // Resize combobox list
// NOTE: there are some corner cases, like the list
// being above the button; the list being too high so
- // it's scrolled, etc. - these must be taken into account
+ // it's scrolled, etc. - these must be taken into account; currently they are not
+ GtkRequisition req;
+ int w,h;
+ GtkWidget* window=gtk_widget_get_parent(gtk_widget_get_parent(widget));
+
+ // What height should be set
+ gtk_widget_size_request(gtk_widget_get_parent(widget),&req);
+ // What size is actually set
+ gtk_window_get_size(GTK_WINDOW(window),&w,&h);
+
+ if(h>req.height)
+ gtk_widget_set_size_request(window,w,req.height);
}
return TRUE;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic