[SCM] calf/master: + GUI: improve GUI resizing for plugins containing live graphs

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:38:38 UTC 2013


The following commit has been merged in the master branch:
commit 93986df1a0c9d3b30a330c6dd6b8f9203e98ed5c
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Wed Nov 26 00:43:08 2008 +0000

    + GUI: improve GUI resizing for plugins containing live graphs

diff --git a/gui/gui-filter.xml b/gui/gui-filter.xml
index b6eb454..1d980c0 100644
--- a/gui/gui-filter.xml
+++ b/gui/gui-filter.xml
@@ -1,9 +1,10 @@
-<vbox border="10">
-    <hbox>
-        <label param="mode"  />
-        <combo param="mode" expand-x="1" />
-    </hbox>
-    <hbox>
+<table border="10" rows="3" cols="1">
+    <table attach-x="0" attach-y="0" shrink-y="1" expand-x="1" cols="3" rows="1" >
+        <label param="mode" attach-x="0" attach-y="0" shrink-x="1"/>
+        <label attach-x="1" attach-y="0" shrink-x="1" pad-x="10"/>
+        <combo param="mode" attach-x="2" attach-y="0"/>
+    </table>
+    <hbox attach-x="0" attach-y="1" shrink-y="1" expand-x="1" fill-x="1">
         <vbox border="10">
             <label param="freq" />
             <knob param="freq" />
@@ -21,8 +22,8 @@
         </vbox>
     </hbox>
     <if cond="directlink">
-        <vbox expand-x="1" fill-x="1" attach-x="3" attach-y="0" attach-h="7">
+        <vbox expand-x="1" fill-x="1" attach-x="0" attach-y="2">
             <line-graph refresh="1" width="160" height="160" param="freq"/>
         </vbox>
     </if>
-</vbox>
+</table>
diff --git a/gui/gui-flanger.xml b/gui/gui-flanger.xml
index 1966745..43388c1 100644
--- a/gui/gui-flanger.xml
+++ b/gui/gui-flanger.xml
@@ -1,5 +1,5 @@
-<table rows="3" cols="1">
-    <frame label="Timbre" fill-y="0" expand-y="0" shrink-y="1" attach-x="0" attach-y="0" >
+<table rows="3" cols="1" border="10">
+    <frame label="Timbre" shrink-y="1" attach-x="0" attach-y="0" >
         <hbox>
             <vbox border="10" expand="0">
                 <label param="min_delay" />
@@ -23,7 +23,7 @@
             </vbox>
         </hbox>
     </frame>
-    <frame label="LFO" fill-y="0" expand-y="0" shrink-y="1" attach-x="0" attach-y="1" >
+    <frame label="LFO" shrink-y="1" attach-x="0" attach-y="1" >
         <hbox>
             <vbox border="10" expand="0">
                 <label param="mod_rate" />
diff --git a/gui/gui-multichorus.xml b/gui/gui-multichorus.xml
index fb7880b..48f9951 100644
--- a/gui/gui-multichorus.xml
+++ b/gui/gui-multichorus.xml
@@ -1,5 +1,5 @@
-<vbox border="10">
-    <frame label="Timbre">
+<table rows="3" cols="2" border="10">
+    <frame label="Timbre" attach-x="0" attach-y="0" shrink-y="1">
         <hbox>
             <vbox border="10">
                 <label param="min_delay" />
@@ -23,7 +23,7 @@
             </vbox>
         </hbox>
     </frame>
-    <frame label="LFO">
+    <frame label="LFO" attach-x="0" attach-y="1" shrink-y="1">
         <hbox>
             <vbox border="10">
                 <label param="mod_rate" />
@@ -43,7 +43,7 @@
         </hbox>
     </frame>
     <if cond="directlink">
-        <hbox>
+        <hbox attach-x="0" attach-y="2" fill-y="1" expand-y="1">
             <frame label="Freq. response">
                 <vbox expand-x="1" fill-x="1" attach-x="3" attach-y="0" attach-h="7">
                     <line-graph refresh="1" width="160" height="160" param="min_delay"/>
@@ -57,4 +57,4 @@
             </frame>
         </hbox>
     </if>
-</vbox>
+</table>
diff --git a/gui/gui-phaser.xml b/gui/gui-phaser.xml
index 8e56a7b..1cb35ec 100644
--- a/gui/gui-phaser.xml
+++ b/gui/gui-phaser.xml
@@ -1,5 +1,5 @@
-<vbox border="10">
-    <frame label="Timbre">
+<table border="10" cols="1" rows="2">
+    <frame label="Timbre" attach-x="0" attach-y="0" shrink-y="1">
         <vbox>
             <hbox>
                 <vbox border="10">
@@ -32,7 +32,7 @@
             </hbox>
         </vbox>
     </frame>
-    <frame label="LFO">
+    <frame label="LFO"  attach-x="0" attach-y="1" shrink-y="1">
         <hbox>
             <vbox border="10">
                 <label param="mod_rate" />
@@ -47,4 +47,4 @@
             </vbox>
         </hbox>
     </frame>
-</vbox>
+</table>
diff --git a/src/gui.cpp b/src/gui.cpp
index 0ceaba8..5dc5ca6 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -569,8 +569,10 @@ void table_container::add(GtkWidget *widget, control_base *base)
     base->require_int_attribute("attach-y");
     int x = base->get_int("attach-x"), y = base->get_int("attach-y");
     int w = base->get_int("attach-w", 1), h = base->get_int("attach-h", 1);
-    int fillx = (base->get_int("fill-x", 1) ? GTK_FILL : 0) | (base->get_int("expand-x", 1) ? GTK_EXPAND : 0) | (base->get_int("shrink-x", 0) ? GTK_SHRINK : 0);
-    int filly = (base->get_int("fill-y", 1) ? GTK_FILL : 0) | (base->get_int("expand-y", 1) ? GTK_EXPAND : 0) | (base->get_int("shrink-y", 0) ? GTK_SHRINK : 0);
+    int shrinkx = base->get_int("shrink-x", 0);
+    int shrinky = base->get_int("shrink-y", 0);
+    int fillx = (base->get_int("fill-x", !shrinkx) ? GTK_FILL : 0) | (base->get_int("expand-x", !shrinkx) ? GTK_EXPAND : 0) | (shrinkx ? GTK_SHRINK : 0);
+    int filly = (base->get_int("fill-y", !shrinky) ? GTK_FILL : 0) | (base->get_int("expand-y", !shrinky) ? GTK_EXPAND : 0) | (base->get_int("shrink-y", 0) ? GTK_SHRINK : 0);
     int padx = base->get_int("pad-x", 2);
     int pady = base->get_int("pad-y", 2);
     gtk_table_attach(GTK_TABLE(container), widget, x, x + w, y, y + h, (GtkAttachOptions)fillx, (GtkAttachOptions)filly, padx, pady);

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list