Before I review this more in depth, I have a question:
> GtkScrolledWindow doesn't use the natural height and width
> of its child widget if the scrollbar policy is not NEVER. Instead it
> uses the minimum size. We don't want that because the minimum size of
> a VteTerminal is 1x1.
Wouldn't an adding support to GtkScrolledWindow for GTK_SIZE_REQUEST_CONSTANT_SIZE widget looks essentially like this new code in terminal-scrolled-window? If so, I'd really prefer this part to be done inside gtk+.
> we override GtkScrolledWindow's
> get_preferred_height and get_preferred_width virtual methods to make
> it use the natural size.
This will still run GtkScrolledWindow's size-allocate function which doesn't handle CONSTANT_SIZE children...
Review of attachment 327779:
Before I review this more in depth, I have a question:
> GtkScrolledWindow doesn't use the natural height and width
> of its child widget if the scrollbar policy is not NEVER. Instead it
> uses the minimum size. We don't want that because the minimum size of
> a VteTerminal is 1x1.
Wouldn't an adding support to GtkScrolledWindow for GTK_SIZE_ REQUEST_ CONSTANT_ SIZE widget looks essentially like this new code in terminal- scrolled- window? If so, I'd really prefer this part to be done inside gtk+.
> we override GtkScrolledWindow's height and get_preferred_width virtual methods to make
> get_preferred_
> it use the natural size.
This will still run GtkScrolledWindow's size-allocate function which doesn't handle CONSTANT_SIZE children...
::: src/terminal- screen- container. c
@@ +21,3 @@
#include "terminal-debug.h"
+#if GTK_CHECK_VERSION (3, 19, 5)
Let's do
#if gtk 3.19.5
#define USE_SCROLLED_WINDOW
#endif
and then use that new define everywhere below. Makes it easier by just having to change one place when one wants to try both code paths.
@@ +134,3 @@ window) ; scrolled_ window) ;
+
+ gtk_container_add (GTK_CONTAINER (container), priv->scrolled_
+ gtk_widget_show_all (priv->
I prefer individual gtk_widget_show() for each widget instead of show-all.