aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-08-31 07:23:47 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-08-31 07:23:47 +0800
commit14f4aec7b07da83fc09c60a2f171d110b4f7fe1a (patch)
treefdc7e0798f4a992ccb819ba8e3a7a46ef73ca672 /widgets
parent6c1e363f9caa60ca7077f722443ff455a9fa8f7e (diff)
downloadgsoc2013-evolution-14f4aec7b07da83fc09c60a2f171d110b4f7fe1a.tar
gsoc2013-evolution-14f4aec7b07da83fc09c60a2f171d110b4f7fe1a.tar.gz
gsoc2013-evolution-14f4aec7b07da83fc09c60a2f171d110b4f7fe1a.tar.bz2
gsoc2013-evolution-14f4aec7b07da83fc09c60a2f171d110b4f7fe1a.tar.lz
gsoc2013-evolution-14f4aec7b07da83fc09c60a2f171d110b4f7fe1a.tar.xz
gsoc2013-evolution-14f4aec7b07da83fc09c60a2f171d110b4f7fe1a.tar.zst
gsoc2013-evolution-14f4aec7b07da83fc09c60a2f171d110b4f7fe1a.zip
Do not flicker while trying to resize a quantized pane.
2000-08-30 Federico Mena Quintero <federico@helixcode.com> * e-paned/e-hpaned.c (e_hpaned_motion): Do not flicker while trying to resize a quantized pane. * e-paned/e-vpaned.c (e_vpaned_motion): Likewise. svn path=/trunk/; revision=5125
Diffstat (limited to 'widgets')
-rw-r--r--widgets/ChangeLog7
-rw-r--r--widgets/e-paned/e-hpaned.c16
-rw-r--r--widgets/e-paned/e-vpaned.c16
3 files changed, 33 insertions, 6 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index 8aa996141b..09425c22f6 100644
--- a/widgets/ChangeLog
+++ b/widgets/ChangeLog
@@ -1,5 +1,12 @@
2000-08-30 Federico Mena Quintero <federico@helixcode.com>
+ * e-paned/e-hpaned.c (e_hpaned_motion): Do not flicker while
+ trying to resize a quantized pane.
+
+ * e-paned/e-vpaned.c (e_vpaned_motion): Likewise.
+
+2000-08-30 Federico Mena Quintero <federico@helixcode.com>
+
* widgets/e-paned/e-vpaned.c (e_vpaned_size_allocate): Ensure that
the child's allocation height is >= 1.
diff --git a/widgets/e-paned/e-hpaned.c b/widgets/e-paned/e-hpaned.c
index 5f2e451447..e003d5a7eb 100644
--- a/widgets/e-paned/e-hpaned.c
+++ b/widgets/e-paned/e-hpaned.c
@@ -423,10 +423,20 @@ e_hpaned_motion (GtkWidget *widget,
if (paned->in_drag)
{
- gint size = x - GTK_CONTAINER (paned)->border_width - paned->handle_size / 2;
-
+ gint size;
+ gint new_child1_size;
+
+ size = x - GTK_CONTAINER (paned)->border_width - paned->handle_size / 2;
+
+ new_child1_size = CLAMP (e_paned_quantized_size(paned, size),
+ paned->min_position,
+ paned->max_position);
+
+ if (new_child1_size == paned->child1_size)
+ return TRUE;
+
e_hpaned_xor_line (paned);
- paned->child1_size = CLAMP (e_paned_quantized_size(paned, size), paned->min_position, paned->max_position);
+ paned->child1_size = new_child1_size;
paned->child1_real_size = paned->child1_size;
e_hpaned_xor_line (paned);
}
diff --git a/widgets/e-paned/e-vpaned.c b/widgets/e-paned/e-vpaned.c
index c13ed2f549..be9e22a877 100644
--- a/widgets/e-paned/e-vpaned.c
+++ b/widgets/e-paned/e-vpaned.c
@@ -422,10 +422,20 @@ e_vpaned_motion (GtkWidget *widget,
if (paned->in_drag)
{
- gint size = y - GTK_CONTAINER(paned)->border_width - paned->handle_size / 2;
-
+ gint size;
+ gint new_child1_size;
+
+ size = y - GTK_CONTAINER(paned)->border_width - paned->handle_size / 2;
+
+ new_child1_size = CLAMP (e_paned_quantized_size(paned, size),
+ paned->min_position,
+ paned->max_position);
+
+ if (new_child1_size == paned->child1_size)
+ return TRUE;
+
e_vpaned_xor_line (paned);
- paned->child1_size = CLAMP (e_paned_quantized_size(paned, size), paned->min_position, paned->max_position);
+ paned->child1_size = new_child1_size;
paned->child1_real_size = paned->child1_size;
e_vpaned_xor_line(paned);
}