gnome-scan r710 - in trunk: . lib
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-scan r710 - in trunk: . lib
- Date: Sat, 20 Dec 2008 15:19:02 +0000 (UTC)
Author: bersace
Date: Sat Dec 20 15:19:01 2008
New Revision: 710
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=710&view=rev
Log:
Automatically use horizontal scrollbars.
Modified:
trunk/ChangeLog
trunk/lib/gnome-scan-option-page.vala
Modified: trunk/lib/gnome-scan-option-page.vala
==============================================================================
--- trunk/lib/gnome-scan-option-page.vala (original)
+++ trunk/lib/gnome-scan-option-page.vala Sat Dec 20 15:19:01 2008
@@ -46,6 +46,7 @@
private Viewport viewport;
private HashTable<string,OptionBox> boxes;
int scroll_height;
+ int scroll_width;
int box_visible_count = 0;
int box_expanding_count = 0;
@@ -57,7 +58,7 @@
scrowin = new ScrolledWindow(null, null);
this.add(scrowin);
scrowin.shadow_type = ShadowType.NONE;
- scrowin.hscrollbar_policy = PolicyType.NEVER;
+ scrowin.hscrollbar_policy = PolicyType.AUTOMATIC;
scrowin.vscrollbar_policy = PolicyType.AUTOMATIC;
this.viewport = new Viewport(scrowin.hadjustment, scrowin.vadjustment);
viewport.shadow_type = ShadowType.NONE;
@@ -114,7 +115,7 @@
{
Requisition req;
viewport.size_request(out req);
- if (this.scroll_height < req.height) {
+ if (this.scroll_height < req.height || this.scroll_width < req.width) {
scrowin.shadow_type = ShadowType.IN;
}
else {
@@ -125,6 +126,7 @@
private void on_size_allocate(ScrolledWindow scrowin, Gdk.Rectangle alloc)
{
this.scroll_height = alloc.height;
+ this.scroll_width = alloc.width;
this.update_shadow_type();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]