Package: realtimebattle
Version: 1.0.8-13
Severity: normal

When using realtimebattle on systems with smaller screens (usually projectors
or netbooks), the options screen is larger than the available screen real
estate. In this case, the buttons on the bottom of the screen (including "OK",
"Cancel" and "Apply") are hidden and they are not practically usable.

What the options window is suposed to look like:
 - http://i.imgur.com/ZQtVYv4.png

What the options window looks like on a low resolution screen (800x600 in this
case):
 - http://i.imgur.com/QHbSalV.png

I have a simple patch that wraps the options in a scrolled window, which makes
the options window small enough to be usable on small screens without losing
any options in the window.



-- System Information:
Debian Release: 7.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages realtimebattle depends on:
ii  libc6                  2.13-38
ii  libgcc1                1:4.7.2-5
ii  libgdk-pixbuf2.0-0     2.26.1-1
ii  libglib2.0-0           2.33.12+really2.32.4-5
ii  libgtk2.0-0            2.24.10-2
ii  libstdc++6             4.7.2-5
ii  realtimebattle-common  1.0.8-13

realtimebattle recommends no packages.

realtimebattle suggests no packages.

-- no debconf information
--- a/src/OptionsWindow.cc
+++ b/src/OptionsWindow.cc
@@ -242,8 +242,22 @@ OptionsWindow::OptionsWindow( const int default_width,
 
       GtkWidget* label = gtk_label_new( page_titles[i] );
       gtk_widget_show( label );
+
+      /* create a new scrolled window to hold the table*/
+      GtkWidget* scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+
+      gtk_container_border_width (GTK_CONTAINER (scrolled_window), 10);
+
+      gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
+                                        GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
+
+      gtk_widget_show (scrolled_window);
+
+      /* pack the table into the scrolled window */
+      gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), page_vbox);
+
       gtk_notebook_append_page( GTK_NOTEBOOK( notebook ),
-                                page_vbox, label );
+                                scrolled_window, label );
     }
 
   // Lower buttons

Reply via email to