]> git.sur5r.net Git - glabels/commitdiff
New text vertical alignment feature.
authorJames Le Cuirot <chewi@aura-online.co.uk>
Mon, 23 Jan 2012 02:27:08 +0000 (21:27 -0500)
committerJim Evins <evins@snaught.com>
Mon, 23 Jan 2012 02:27:08 +0000 (21:27 -0500)
Adds vertical alignment feature for text objects.
Added appropriate icons (evins@snaught.com).

22 files changed:
data/icons/22x22/Makefile.am
data/icons/22x22/actions/glabels-align-text-bottom.png [new file with mode: 0644]
data/icons/22x22/actions/glabels-align-text-middle.png [new file with mode: 0644]
data/icons/22x22/actions/glabels-align-text-top.png [new file with mode: 0644]
data/icons/24x24/Makefile.am
data/icons/24x24/actions/glabels-align-text-bottom.png [new file with mode: 0644]
data/icons/24x24/actions/glabels-align-text-middle.png [new file with mode: 0644]
data/icons/24x24/actions/glabels-align-text-top.png [new file with mode: 0644]
data/ui/object-editor.ui
data/ui/property-bar.ui
src/label-object.c
src/label-object.h
src/label-text.c
src/label.c
src/label.h
src/object-editor-private.h
src/object-editor-text-page.c
src/object-editor.c
src/str-util.c
src/ui-property-bar.c
src/xml-label.c
templates/glabels-3.0.dtd

index 955d860919c48d7cabfee1a961b43402c4e711bf..1587bb6daf1339a45a20fd0f694f122409e192c5 100644 (file)
@@ -1,11 +1,18 @@
 
 size = 22x22
 appiconsdir = $(datadir)/icons/hicolor/$(size)/apps
+actioniconsdir = $(datadir)/$(GLABELS_BRANCH)/icons/hicolor/$(size)/actions
 
 appicons_DATA = \
        apps/glabels-3.0.png
 
+actionicons_DATA = \
+       actions/glabels-align-text-bottom.png   \
+       actions/glabels-align-text-middle.png   \
+       actions/glabels-align-text-top.png
+
 noinst_DATA =
 
-EXTRA_DIST = $(appicons_DATA) \
+EXTRA_DIST = $(appicons_DATA)                  \
+            $(actionicons_DATA)                \
             $(noinst_DATA)
diff --git a/data/icons/22x22/actions/glabels-align-text-bottom.png b/data/icons/22x22/actions/glabels-align-text-bottom.png
new file mode 100644 (file)
index 0000000..a9586f9
Binary files /dev/null and b/data/icons/22x22/actions/glabels-align-text-bottom.png differ
diff --git a/data/icons/22x22/actions/glabels-align-text-middle.png b/data/icons/22x22/actions/glabels-align-text-middle.png
new file mode 100644 (file)
index 0000000..2de6342
Binary files /dev/null and b/data/icons/22x22/actions/glabels-align-text-middle.png differ
diff --git a/data/icons/22x22/actions/glabels-align-text-top.png b/data/icons/22x22/actions/glabels-align-text-top.png
new file mode 100644 (file)
index 0000000..fda4420
Binary files /dev/null and b/data/icons/22x22/actions/glabels-align-text-top.png differ
index 4dd62a0432a44dc977fd8cd19cd0941a7ce71960..4af195ef7465601531de8c75621995eeb45f6abb 100644 (file)
@@ -7,6 +7,9 @@ appicons_DATA = \
        apps/glabels-3.0.png
 
 actionicons_DATA = \
+       actions/glabels-align-text-bottom.png   \
+       actions/glabels-align-text-middle.png   \
+       actions/glabels-align-text-top.png      \
        actions/glabels-arrow.png               \
        actions/glabels-barcode.png             \
        actions/glabels-box.png                 \
diff --git a/data/icons/24x24/actions/glabels-align-text-bottom.png b/data/icons/24x24/actions/glabels-align-text-bottom.png
new file mode 100644 (file)
index 0000000..5dbc037
Binary files /dev/null and b/data/icons/24x24/actions/glabels-align-text-bottom.png differ
diff --git a/data/icons/24x24/actions/glabels-align-text-middle.png b/data/icons/24x24/actions/glabels-align-text-middle.png
new file mode 100644 (file)
index 0000000..33220ca
Binary files /dev/null and b/data/icons/24x24/actions/glabels-align-text-middle.png differ
diff --git a/data/icons/24x24/actions/glabels-align-text-top.png b/data/icons/24x24/actions/glabels-align-text-top.png
new file mode 100644 (file)
index 0000000..2ece60d
Binary files /dev/null and b/data/icons/24x24/actions/glabels-align-text-top.png differ
index 582a19e053f65ea9c6ae2f3ada93dc604a995be6..422bcca38743ba8c5f45fca2a06c629aedbcd0e8 100644 (file)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="2.20"/>
-  <!-- interface-naming-policy toplevel-contextual -->
   <object class="GtkAdjustment" id="adjustment1">
     <property name="lower">1</property>
     <property name="upper">250</property>
@@ -9,6 +8,29 @@
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
+  <object class="GtkAdjustment" id="adjustment10">
+    <property name="upper">100</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment11">
+    <property name="upper">100</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment12">
+    <property name="upper">100</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment13">
+    <property name="lower">1</property>
+    <property name="upper">100</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkAdjustment" id="adjustment2">
     <property name="upper">5</property>
     <property name="value">1</property>
     <property name="step_increment">0.01</property>
     <property name="page_increment">1</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment10">
-    <property name="upper">100</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">1</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment11">
-    <property name="upper">100</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">1</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment12">
-    <property name="upper">100</property>
-    <property name="value">1</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment13">
-    <property name="lower">1</property>
-    <property name="upper">100</property>
-    <property name="value">1</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkSizeGroup" id="page_sizegroup">
-    <property name="mode">both</property>
-    <widgets>
-      <widget name="shadow_page_vbox"/>
-      <widget name="lsize_page_vbox"/>
-      <widget name="size_page_vbox"/>
-      <widget name="bc_page_vbox"/>
-      <widget name="data_page_vbox"/>
-      <widget name="img_page_vbox"/>
-      <widget name="fill_page_vbox"/>
-      <widget name="line_page_vbox"/>
-      <widget name="text_page_vbox"/>
-      <widget name="edit_page_vbox"/>
-    </widgets>
-  </object>
-  <object class="GtkSizeGroup" id="width_sizegroup">
-    <widgets>
-      <widget name="notebook"/>
-      <widget name="title_hbox"/>
-    </widgets>
-  </object>
   <object class="GtkDialog" id="dialog">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">dialog1</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="closebutton1">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkVBox" id="editor_vbox">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">6</property>
             <property name="spacing">12</property>
             <child>
               <object class="GtkHBox" id="title_hbox">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="spacing">12</property>
                 <child>
                   <object class="GtkImage" id="title_image">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
                 <child>
                   <object class="GtkLabel" id="title_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label">&lt;span weight="bold" size="larger"&gt;Xxx object properties&lt;/span&gt;</property>
                     <property name="use_markup">True</property>
                   </object>
                 <child>
                   <object class="GtkVBox" id="edit_page_vbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkHBox" id="hbox30">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkScrolledWindow" id="scrolledwindow1">
                             <property name="visible">True</property>
                     <child>
                       <object class="GtkHBox" id="hbox1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkVBox" id="edit_insert_field_vbox">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <placeholder/>
                             </child>
                 <child type="tab">
                   <object class="GtkLabel" id="edit_tab_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Text</property>
                   </object>
                   <packing>
                 <child>
                   <object class="GtkVBox" id="text_page_vbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="spacing">12</property>
                     <child>
                       <object class="GtkHBox" id="hbox65">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="text_family_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Family:</property>
                           </object>
                         <child>
                           <object class="GtkHBox" id="text_family_hbox">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <placeholder/>
                             </child>
                     <child>
                       <object class="GtkHBox" id="hbox66">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="text_size_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Size:</property>
                           </object>
                         <child>
                           <object class="GtkHBox" id="hbox28">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkSpinButton" id="text_size_spin">
                     <child>
                       <object class="GtkHBox" id="hbox67">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="text_style_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Style:</property>
                           </object>
                         <child>
                           <object class="GtkHBox" id="hbox29">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkToggleButton" id="text_bold_toggle">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <child>
                                   <object class="GtkImage" id="image1">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="stock">gtk-bold</property>
                                   </object>
                                 </child>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <child>
                                   <object class="GtkImage" id="image2">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="stock">gtk-italic</property>
                                   </object>
                                 </child>
                     <child>
                       <object class="GtkHBox" id="hbox68">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="text_color_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="yalign">0.14000000059604645</property>
                             <property name="label" translatable="yes">Color:</property>
                         <child>
                           <object class="GtkVBox" id="vbox3">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkHBox" id="hbox42">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkRadioButton" id="text_color_radio">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="use_underline">True</property>
                                     <property name="focus_on_click">False</property>
                                     <property name="draw_indicator">True</property>
                                 <child>
                                   <object class="GtkHBox" id="text_color_hbox">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="spacing">12</property>
                                     <child>
                                       <placeholder/>
                             <child>
                               <object class="GtkHBox" id="hbox44">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkRadioButton" id="text_color_key_radio">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="use_underline">True</property>
                                     <property name="focus_on_click">False</property>
                                     <property name="xalign">0.54000002145767212</property>
                                 <child>
                                   <object class="GtkHBox" id="text_color_key_hbox">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="spacing">12</property>
                                     <child>
                                       <placeholder/>
                     <child>
                       <object class="GtkHBox" id="hbox69">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="text_align_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Alignment:</property>
                           </object>
                         <child>
                           <object class="GtkHBox" id="hbox4">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkToggleButton" id="text_left_toggle">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <child>
                                   <object class="GtkImage" id="image3">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="stock">gtk-justify-left</property>
                                   </object>
                                 </child>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <child>
                                   <object class="GtkImage" id="image4">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="stock">gtk-justify-center</property>
                                   </object>
                                 </child>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <child>
                                   <object class="GtkImage" id="image5">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="stock">gtk-justify-right</property>
                                   </object>
                                 </child>
                         <property name="position">4</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkHBox" id="hbox69v">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">12</property>
+                        <child>
+                          <object class="GtkLabel" id="text_valign_label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Vertical alignment:</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox4v">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="spacing">12</property>
+                            <child>
+                              <object class="GtkToggleButton" id="text_top_toggle">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
+                                <child>
+                                  <object class="GtkImage" id="image3v">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="pixel_size">22</property>
+                                    <property name="icon_name">glabels-align-text-top</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkToggleButton" id="text_vcenter_toggle">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
+                                <property name="xalign">0.47999998927116394</property>
+                                <child>
+                                  <object class="GtkImage" id="image4v">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="pixel_size">22</property>
+                                    <property name="icon_name">glabels-align-text-middle</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkToggleButton" id="text_bottom_toggle">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
+                                <child>
+                                  <object class="GtkImage" id="image5v">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="pixel_size">22</property>
+                                    <property name="icon_name">glabels-align-text-bottom</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">5</property>
+                      </packing>
+                    </child>
                     <child>
                       <object class="GtkHBox" id="hbox70">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="text_line_spacing_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Line Spacing:</property>
                           </object>
                         <child>
                           <object class="GtkHBox" id="hbox31">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkSpinButton" id="text_line_spacing_spin">
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
-                        <property name="position">5</property>
+                        <property name="position">6</property>
                       </packing>
                     </child>
                     <child>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
-                        <property name="position">6</property>
+                        <property name="position">7</property>
                       </packing>
                     </child>
                   </object>
                 <child type="tab">
                   <object class="GtkLabel" id="text_tab_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0.46000000834465027</property>
                     <property name="label" translatable="yes">Style</property>
                   </object>
                 <child>
                   <object class="GtkVBox" id="line_page_vbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="spacing">12</property>
                     <child>
                       <object class="GtkHBox" id="hbox71">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="line_w_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Width:</property>
                           </object>
                         <child>
                           <object class="GtkHBox" id="hbox7">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkSpinButton" id="line_width_spin">
                             <child>
                               <object class="GtkLabel" id="label21">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="label" translatable="yes">points</property>
                               </object>
                               <packing>
                     <child>
                       <object class="GtkHBox" id="hbox72">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="line_color_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="yalign">0.14000000059604645</property>
                             <property name="label" translatable="yes">Color:</property>
                         <child>
                           <object class="GtkVBox" id="vbox2">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">6</property>
-                           <property name="vexpand">False</property>
                             <child>
                               <object class="GtkHBox" id="hbox38">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkRadioButton" id="line_color_radio">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="use_underline">True</property>
                                     <property name="focus_on_click">False</property>
                                     <property name="draw_indicator">True</property>
                                 <child>
                                   <object class="GtkHBox" id="line_color_hbox">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="spacing">12</property>
                                     <child>
                                       <placeholder/>
                             <child>
                               <object class="GtkHBox" id="hbox40">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkRadioButton" id="line_key_radio">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="use_underline">True</property>
                                     <property name="focus_on_click">False</property>
                                     <property name="draw_indicator">True</property>
                                 <child>
                                   <object class="GtkHBox" id="line_key_hbox">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="spacing">12</property>
                                     <child>
                                       <placeholder/>
                 <child type="tab">
                   <object class="GtkLabel" id="line_tab_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Line</property>
                   </object>
                   <packing>
                 <child>
                   <object class="GtkVBox" id="fill_page_vbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <child>
                       <object class="GtkHBox" id="hbox73">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
-                       <property name="vexpand">False</property>
                         <child>
                           <object class="GtkLabel" id="fill_color_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="yalign">0.14000000059604645</property>
                             <property name="label" translatable="yes">Color:</property>
                         <child>
                           <object class="GtkVBox" id="vbox5">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkHBox" id="hbox50">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkRadioButton" id="fill_color_radio">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="use_underline">True</property>
                                     <property name="focus_on_click">False</property>
                                     <property name="active">True</property>
                                 <child>
                                   <object class="GtkHBox" id="fill_color_hbox">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="spacing">12</property>
                                     <child>
                                       <placeholder/>
                             <child>
                               <object class="GtkHBox" id="hbox52">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkRadioButton" id="fill_key_radio">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="use_underline">True</property>
                                     <property name="focus_on_click">False</property>
                                     <property name="draw_indicator">True</property>
                                 <child>
                                   <object class="GtkHBox" id="fill_key_hbox">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="spacing">12</property>
                                     <child>
                                       <placeholder/>
                 <child type="tab">
                   <object class="GtkLabel" id="fill_tab_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Fill</property>
                   </object>
                   <packing>
                 <child>
                   <object class="GtkVBox" id="img_page_vbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="spacing">12</property>
                     <child>
                       <object class="GtkHBox" id="hbox74">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkRadioButton" id="img_file_radio">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="focus_on_click">False</property>
                             <property name="draw_indicator">True</property>
                         <child>
                           <object class="GtkFileChooserButton" id="img_file_button">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="show_hidden">True</property>
                           </object>
                           <packing>
                     <child>
                       <object class="GtkHBox" id="hbox75">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkRadioButton" id="img_key_radio">
                             <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="focus_on_click">False</property>
                             <property name="draw_indicator">True</property>
                         <child>
                           <object class="GtkHBox" id="img_key_hbox">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <placeholder/>
                             </child>
                 <child type="tab">
                   <object class="GtkLabel" id="img_tab_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Image</property>
                   </object>
                   <packing>
                 <child>
                   <object class="GtkVBox" id="data_page_vbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="spacing">12</property>
                     <child>
                       <object class="GtkHBox" id="hbox76">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkRadioButton" id="data_literal_radio">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
                     <child>
                       <object class="GtkHBox" id="hbox77">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkRadioButton" id="data_key_radio">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">data_literal_radio</property>
                         <child>
                           <object class="GtkHBox" id="data_key_hbox">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <placeholder/>
                             </child>
                     <child>
                       <object class="GtkHBox" id="hbox78">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="data_fill_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label">         </property>
                           </object>
                           <packing>
                         <child>
                           <object class="GtkTable" id="table9">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="n_rows">2</property>
                             <property name="n_columns">2</property>
                             <property name="column_spacing">6</property>
                             <child>
                               <object class="GtkLabel" id="data_format_label">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">format:</property>
                               </object>
                             <child>
                               <object class="GtkLabel" id="data_ex_label">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="label">00000000000 00000</property>
                               </object>
                             <child>
                               <object class="GtkLabel" id="data_digits_label">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">digits:</property>
                               </object>
                             <child>
                               <object class="GtkHBox" id="hbox32">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <child>
                                   <object class="GtkSpinButton" id="data_digits_spin">
                                     <property name="visible">True</property>
                 <child type="tab">
                   <object class="GtkLabel" id="data_tab_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Data</property>
                   </object>
                   <packing>
                 <child>
                   <object class="GtkVBox" id="bc_page_vbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="spacing">12</property>
                     <child>
                       <object class="GtkTable" id="table1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="n_rows">2</property>
                         <property name="n_columns">2</property>
                         <property name="column_spacing">6</property>
                         <property name="row_spacing">6</property>
-                       <property name="vexpand">False</property>
                         <child>
                           <object class="GtkLabel" id="bc_be_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Backend:</property>
                           </object>
                         <child>
                           <object class="GtkLabel" id="bc_style_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Style:</property>
                           </object>
                         <child>
                           <object class="GtkHBox" id="bc_backend_combo_hbox">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <placeholder/>
                             </child>
                         <child>
                           <object class="GtkHBox" id="bc_style_combo_hbox">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <placeholder/>
                             </child>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
                     <child>
                       <object class="GtkHBox" id="hbox80">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
-                       <property name="vexpand">False</property>
                         <child>
                           <object class="GtkLabel" id="bc_color_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="yalign">0.14000000059604645</property>
                             <property name="label" translatable="yes">Color:</property>
                         <child>
                           <object class="GtkVBox" id="vbox4">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkHBox" id="hbox46">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkRadioButton" id="bc_color_radio">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="use_underline">True</property>
                                     <property name="focus_on_click">False</property>
                                     <property name="active">True</property>
                                 <child>
                                   <object class="GtkHBox" id="bc_color_hbox">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="spacing">12</property>
                                     <child>
                                       <placeholder/>
                             <child>
                               <object class="GtkHBox" id="hbox48">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkRadioButton" id="bc_key_radio">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
                                     <property name="use_underline">True</property>
                                     <property name="focus_on_click">False</property>
                                     <property name="draw_indicator">True</property>
                                 <child>
                                   <object class="GtkHBox" id="bc_key_hbox">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="spacing">12</property>
                                     <child>
                                       <placeholder/>
                 <child type="tab">
                   <object class="GtkLabel" id="bc_tab_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Style</property>
                   </object>
                   <packing>
                 <child>
                   <object class="GtkVBox" id="size_page_vbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="spacing">12</property>
                     <child>
                       <object class="GtkTable" id="table6">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="n_rows">3</property>
                         <property name="n_columns">3</property>
                         <property name="column_spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="size_w_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Width:</property>
                           </object>
                         <child>
                           <object class="GtkLabel" id="size_h_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Height:</property>
                           </object>
                         <child>
                           <object class="GtkHBox" id="hbox11">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkSpinButton" id="size_h_spin">
                             <child>
                               <object class="GtkLabel" id="size_h_units_label">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="label" translatable="yes">inches</property>
                               </object>
                               <packing>
                         <child>
                           <object class="GtkHBox" id="hbox13">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkButton" id="size_reset_image_button">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
                         <child>
                           <object class="GtkHBox" id="hbox10">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkSpinButton" id="size_w_spin">
                             <child>
                               <object class="GtkLabel" id="size_w_units_label">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="label" translatable="yes">inches</property>
                               </object>
                               <packing>
                         <child>
                           <object class="GtkVBox" id="size_aspect_vbox">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <placeholder/>
                             </child>
                 <child type="tab">
                   <object class="GtkLabel" id="size_tab_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Size</property>
                   </object>
                   <packing>
                 <child>
                   <object class="GtkVBox" id="lsize_page_vbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="spacing">12</property>
                     <child>
                       <object class="GtkTable" id="table7">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="n_rows">2</property>
                         <property name="n_columns">2</property>
                         <property name="column_spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="lsize_r_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Length:</property>
                           </object>
                         <child>
                           <object class="GtkLabel" id="lsize_theta_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Angle:</property>
                           </object>
                         <child>
                           <object class="GtkHBox" id="hbox25">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkSpinButton" id="lsize_r_spin">
                             <child>
                               <object class="GtkLabel" id="lsize_r_units_label">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="label" translatable="yes">inches</property>
                               </object>
                               <packing>
                         <child>
                           <object class="GtkHBox" id="hbox26">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkSpinButton" id="lsize_theta_spin">
                             <child>
                               <object class="GtkLabel" id="label38">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="label" translatable="yes">degrees</property>
                               </object>
                               <packing>
                 <child type="tab">
                   <object class="GtkLabel" id="lsize_tab_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Size</property>
                   </object>
                   <packing>
                 <child>
                   <object class="GtkVBox" id="pos_page_vbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="spacing">12</property>
                     <child>
                       <object class="GtkTable" id="table8">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="n_rows">2</property>
                         <property name="n_columns">3</property>
                         <property name="column_spacing">12</property>
                           <object class="GtkLabel" id="pos_x_label">
                             <property name="width_request">50</property>
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">X:</property>
                           </object>
                         <child>
                           <object class="GtkLabel" id="pos_y_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Y:</property>
                           </object>
                         <child>
                           <object class="GtkLabel" id="pos_x_units_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">inches</property>
                           </object>
                         <child>
                           <object class="GtkLabel" id="pos_y_units_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">inches</property>
                           </object>
                 <child type="tab">
                   <object class="GtkLabel" id="pos_tab_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Position</property>
                   </object>
                   <packing>
                 <child>
                   <object class="GtkVBox" id="shadow_page_vbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="spacing">12</property>
                     <child>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
                     <child>
                       <object class="GtkVBox" id="shadow_controls_table">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
-                       <property name="vexpand">False</property>
                         <child>
                           <object class="GtkHBox" id="hbox63">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkLabel" id="label40">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">X Offset:</property>
                               </object>
                             <child>
                               <object class="GtkHBox" id="hbox54">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">12</property>
                                 <child>
                                   <object class="GtkSpinButton" id="shadow_x_spin">
                                 <child>
                                   <object class="GtkLabel" id="shadow_x_units_label">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="label" translatable="yes">inches</property>
                                   </object>
                                   <packing>
                         <child>
                           <object class="GtkHBox" id="hbox64">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkLabel" id="label41">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Y Offset:</property>
                               </object>
                             <child>
                               <object class="GtkHBox" id="hbox55">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">12</property>
                                 <child>
                                   <object class="GtkSpinButton" id="shadow_y_spin">
                                 <child>
                                   <object class="GtkLabel" id="shadow_y_units_label">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="label" translatable="yes">inches</property>
                                   </object>
                                   <packing>
                         <child>
                           <object class="GtkHBox" id="hbox61">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkLabel" id="label45">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="yalign">0.14000000059604645</property>
                                 <property name="label" translatable="yes">Color:</property>
                             <child>
                               <object class="GtkVBox" id="vbox7">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkHBox" id="hbox57">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="spacing">6</property>
                                     <child>
                                       <object class="GtkRadioButton" id="shadow_color_radio">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">False</property>
+                                        <property name="use_action_appearance">False</property>
                                         <property name="use_underline">True</property>
                                         <property name="focus_on_click">False</property>
                                         <property name="draw_indicator">True</property>
                                     <child>
                                       <object class="GtkHBox" id="shadow_color_hbox">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="spacing">12</property>
                                         <child>
                                           <placeholder/>
                                 <child>
                                   <object class="GtkHBox" id="hbox59">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="spacing">6</property>
                                     <child>
                                       <object class="GtkRadioButton" id="shadow_key_radio">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">False</property>
+                                        <property name="use_action_appearance">False</property>
                                         <property name="use_underline">True</property>
                                         <property name="focus_on_click">False</property>
                                         <property name="draw_indicator">True</property>
                                     <child>
                                       <object class="GtkHBox" id="shadow_key_hbox">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="spacing">12</property>
                                         <child>
                                           <placeholder/>
                         <child>
                           <object class="GtkHBox" id="hbox62">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkLabel" id="label46">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Opacity:</property>
                               </object>
                             <child>
                               <object class="GtkHBox" id="hbox56">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">12</property>
                                 <child>
                                   <object class="GtkSpinButton" id="shadow_opacity_spin">
                                 <child>
                                   <object class="GtkLabel" id="label47">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="label" translatable="yes">%</property>
                                   </object>
                                   <packing>
                 <child type="tab">
                   <object class="GtkLabel" id="shadow_tab_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Shadow</property>
                   </object>
                   <packing>
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="closebutton1">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
       <action-widget response="-7">closebutton1</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkSizeGroup" id="page_sizegroup">
+    <property name="mode">both</property>
+    <widgets>
+      <widget name="shadow_page_vbox"/>
+      <widget name="lsize_page_vbox"/>
+      <widget name="size_page_vbox"/>
+      <widget name="bc_page_vbox"/>
+      <widget name="data_page_vbox"/>
+      <widget name="img_page_vbox"/>
+      <widget name="fill_page_vbox"/>
+      <widget name="line_page_vbox"/>
+      <widget name="text_page_vbox"/>
+      <widget name="edit_page_vbox"/>
+    </widgets>
+  </object>
+  <object class="GtkSizeGroup" id="width_sizegroup">
+    <widgets>
+      <widget name="notebook"/>
+      <widget name="title_hbox"/>
+    </widgets>
+  </object>
 </interface>
index 0d3914a9d2386101240a55c844f39a52ad0dd547..2bb07e608c3c6dbd3ec838c076d0045c38459f1a 100644 (file)
@@ -1,14 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="2.20"/>
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment2">
-    <property name="lower">0.25</property>
-    <property name="upper">4</property>
-    <property name="value">1</property>
-    <property name="step_increment">0.25</property>
-    <property name="page_increment">1</property>
-  </object>
   <object class="GtkAdjustment" id="adjustment1">
     <property name="lower">1</property>
     <property name="upper">250</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="lower">0.25</property>
+    <property name="upper">4</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.25</property>
+    <property name="page_increment">1</property>
+  </object>
   <object class="GtkWindow" id="window1">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">window1</property>
     <child>
       <object class="GtkToolbar" id="property_toolbar">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="toolbar_style">icons</property>
         <property name="show_arrow">False</property>
         <child>
           <object class="GtkToolItem" id="toolitem1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
             <child>
               <object class="GtkEventBox" id="font_family_eventbox">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Font family</property>
                 <property name="visible_window">False</property>
                 <child>
         <child>
           <object class="GtkToolItem" id="toolitem2">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
             <child>
               <object class="GtkAlignment" id="alignment1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="left_padding">6</property>
                 <child>
                   <object class="GtkSpinButton" id="font_size_spin">
@@ -68,6 +75,7 @@
         <child>
           <object class="GtkSeparatorToolItem" id="separatortoolitem1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -76,7 +84,9 @@
         <child>
           <object class="GtkToggleToolButton" id="font_bold_toggle">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="tooltip_text" translatable="yes">Bold</property>
+            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="stock_id">gtk-bold</property>
           </object>
@@ -88,7 +98,9 @@
         <child>
           <object class="GtkToggleToolButton" id="font_italic_toggle">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="tooltip_text" translatable="yes">Italic</property>
+            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="stock_id">gtk-italic</property>
           </object>
         <child>
           <object class="GtkSeparatorToolItem" id="separatortoolitem2">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
           </object>
           <packing>
             <property name="expand">False</property>
         <child>
           <object class="GtkRadioToolButton" id="text_align_left_radio">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="tooltip_text" translatable="yes">Left align</property>
+            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="stock_id">gtk-justify-left</property>
           </object>
         <child>
           <object class="GtkRadioToolButton" id="text_align_center_radio">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="tooltip_text" translatable="yes">Center align</property>
+            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="stock_id">gtk-justify-center</property>
             <property name="group">text_align_left_radio</property>
         <child>
           <object class="GtkRadioToolButton" id="text_align_right_radio">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="tooltip_text" translatable="yes">Right align</property>
+            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="stock_id">gtk-justify-right</property>
             <property name="group">text_align_left_radio</property>
         <child>
           <object class="GtkSeparatorToolItem" id="separatortoolitem3">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioToolButton" id="text_valign_top_radio">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="tooltip_text" translatable="yes">Top vertical align</property>
+            <property name="use_action_appearance">False</property>
+            <property name="use_underline">True</property>
+            <property name="icon_name">glabels-align-text-top</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioToolButton" id="text_valign_vcenter_radio">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="tooltip_text" translatable="yes">Center vertical align</property>
+            <property name="use_action_appearance">False</property>
+            <property name="use_underline">True</property>
+            <property name="icon_name">glabels-align-text-middle</property>
+            <property name="group">text_valign_top_radio</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioToolButton" id="text_valign_bottom_radio">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="tooltip_text" translatable="yes">Bottom vertical align</property>
+            <property name="use_action_appearance">False</property>
+            <property name="use_underline">True</property>
+            <property name="icon_name">glabels-align-text-bottom</property>
+            <property name="group">text_valign_top_radio</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSeparatorToolItem" id="separatortoolitem4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
           </object>
           <packing>
             <property name="expand">False</property>
         <child>
           <object class="GtkToolItem" id="toolitem3">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
             <child>
               <object class="GtkEventBox" id="text_color_eventbox">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Text color</property>
                 <property name="visible_window">False</property>
                 <child>
         <child>
           <object class="GtkToolItem" id="toolitem4">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
             <child>
               <object class="GtkEventBox" id="fill_color_eventbox">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Fill color</property>
                 <property name="visible_window">False</property>
                 <child>
         <child>
           <object class="GtkToolItem" id="toolitem5">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
             <child>
               <object class="GtkEventBox" id="line_color_eventbox">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Line color</property>
                 <property name="visible_window">False</property>
                 <child>
           </packing>
         </child>
         <child>
-          <object class="GtkSeparatorToolItem" id="separatortoolitem4">
+          <object class="GtkSeparatorToolItem" id="separatortoolitem5">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
           </object>
           <packing>
             <property name="expand">False</property>
         <child>
           <object class="GtkToolItem" id="toolitem6">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
             <child>
               <object class="GtkSpinButton" id="line_width_spin">
                 <property name="visible">True</property>
index 92a8ec20862771f6fbc530086f0a93c40fecffcb..8d48e53a4e7e87937bd4790fd56a16a3fdc39c56 100644 (file)
@@ -782,6 +782,28 @@ gl_label_object_set_text_alignment (glLabelObject     *object,
 }
 
 
+/****************************************************************************/
+/* Set vertical text alignment for all text contained in object.            */
+/****************************************************************************/
+void
+gl_label_object_set_text_valignment (glLabelObject     *object,
+                                    glValignment       text_valignment,
+                                     gboolean           checkpoint)
+{
+       gl_debug (DEBUG_LABEL, "START");
+
+       g_return_if_fail (object && GL_IS_LABEL_OBJECT (object));
+
+       if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_text_valignment != NULL )
+        {
+               /* We have an object specific method, use it */
+               GL_LABEL_OBJECT_GET_CLASS(object)->set_text_valignment (object, text_valignment, checkpoint);
+       }
+
+       gl_debug (DEBUG_LABEL, "END");
+}
+
+
 /****************************************************************************/
 /* Set text line spacing for all text contained in object.                  */
 /****************************************************************************/
@@ -946,6 +968,30 @@ gl_label_object_get_text_alignment (glLabelObject     *object)
 }
 
 
+/****************************************************************************/
+/* Get text alignment for all text contained in object.                     */
+/****************************************************************************/
+glValignment
+gl_label_object_get_text_valignment (glLabelObject     *object)
+{
+       glValignment ret = GL_VALIGN_TOP;
+
+       gl_debug (DEBUG_LABEL, "START");
+
+       g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), GL_VALIGN_TOP);
+
+       if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_text_valignment != NULL )
+        {
+               /* We have an object specific method, use it */
+               ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_text_valignment (object);
+       }
+
+       gl_debug (DEBUG_LABEL, "END");
+
+       return ret;
+}
+
+
 /****************************************************************************/
 /* Get text line spacing for all text contained in object.                  */
 /****************************************************************************/
index 8e898a576cc99d0a78af9075d25e9853de16092d..4c0e3e1eea330ae63cf74c4496dd2b561a4a9d2b 100644 (file)
 G_BEGIN_DECLS
 
 
+typedef enum {
+       GL_VALIGN_TOP,
+       GL_VALIGN_VCENTER,
+       GL_VALIGN_BOTTOM
+} glValignment;
+
+
 typedef enum {
         GL_LABEL_OBJECT_TEXT,
         GL_LABEL_OBJECT_BOX,
@@ -109,6 +116,10 @@ struct _glLabelObjectClass {
                                                    PangoAlignment     text_alignment,
                                                    gboolean           checkpoint);
 
+        void              (*set_text_valignment)  (glLabelObject     *object,
+                                                   glValignment       text_valignment,
+                                                   gboolean           checkpoint);
+
         void              (*set_text_line_spacing)(glLabelObject     *object,
                                                    gdouble            text_line_spacing,
                                                    gboolean           checkpoint);
@@ -143,6 +154,8 @@ struct _glLabelObjectClass {
 
         PangoAlignment    (*get_text_alignment)   (glLabelObject     *object);
 
+        glValignment      (*get_text_valignment)  (glLabelObject     *object);
+
         gdouble           (*get_text_line_spacing) (glLabelObject    *object);
 
         glColorNode *     (*get_text_color)       (glLabelObject     *object);
@@ -273,6 +286,10 @@ void           gl_label_object_set_text_alignment    (glLabelObject     *object,
                                                       PangoAlignment     text_alignment,
                                                       gboolean           checkpoint);
 
+void           gl_label_object_set_text_valignment   (glLabelObject     *object,
+                                                      glValignment       text_valignment,
+                                                      gboolean           checkpoint);
+
 void           gl_label_object_set_text_color        (glLabelObject     *object,
                                                       glColorNode       *text_color_node,
                                                       gboolean           checkpoint);
@@ -351,6 +368,8 @@ gboolean       gl_label_object_get_font_italic_flag  (glLabelObject     *object)
 
 PangoAlignment gl_label_object_get_text_alignment    (glLabelObject     *object);
 
+glValignment   gl_label_object_get_text_valignment   (glLabelObject     *object);
+
 gdouble        gl_label_object_get_text_line_spacing (glLabelObject     *object);
 
 glColorNode   *gl_label_object_get_text_color        (glLabelObject     *object);
index d9146c420aaa35c413ccd1c0dd5c01884a2ebc2b..b2a3231712af3efb0c83dc8c085645e58fd13a61 100644 (file)
@@ -60,6 +60,7 @@ struct _glLabelTextPrivate {
        PangoWeight      font_weight;
        gboolean         font_italic_flag;
        PangoAlignment   align;
+       glValignment     valign;
        glColorNode     *color_node;
        gdouble          line_spacing;
        gboolean         auto_shrink;
@@ -116,6 +117,10 @@ static void set_text_alignment          (glLabelObject    *object,
                                         PangoAlignment    text_alignment,
                                          gboolean          checkpoint);
 
+static void set_text_valignment         (glLabelObject    *object,
+                                        glValignment      text_valignment,
+                                         gboolean          checkpoint);
+
 static void set_text_line_spacing       (glLabelObject    *object,
                                         gdouble           text_line_spacing,
                                          gboolean          checkpoint);
@@ -134,6 +139,8 @@ static gboolean        get_font_italic_flag        (glLabelObject    *object);
 
 static PangoAlignment  get_text_alignment          (glLabelObject    *object);
 
+static glValignment    get_text_valignment         (glLabelObject    *object);
+
 static gdouble         get_text_line_spacing       (glLabelObject    *object);
 
 static glColorNode*    get_text_color              (glLabelObject    *object);
@@ -202,6 +209,7 @@ gl_label_text_class_init (glLabelTextClass *class)
        label_object_class->set_font_weight       = set_font_weight;
        label_object_class->set_font_italic_flag  = set_font_italic_flag;
        label_object_class->set_text_alignment    = set_text_alignment;
+       label_object_class->set_text_valignment   = set_text_valignment;
        label_object_class->set_text_line_spacing = set_text_line_spacing;
        label_object_class->set_text_color        = set_text_color;
        label_object_class->get_font_family       = get_font_family;
@@ -209,6 +217,7 @@ gl_label_text_class_init (glLabelTextClass *class)
        label_object_class->get_font_weight       = get_font_weight;
        label_object_class->get_font_italic_flag  = get_font_italic_flag;
        label_object_class->get_text_alignment    = get_text_alignment;
+       label_object_class->get_text_valignment   = get_text_valignment;
        label_object_class->get_text_line_spacing = get_text_line_spacing;
        label_object_class->get_text_color        = get_text_color;
         label_object_class->draw_object           = draw_object;
@@ -290,6 +299,7 @@ gl_label_text_new (glLabel *label,
                 ltext->priv->font_weight      = gl_label_get_default_font_weight (label);
                 ltext->priv->font_italic_flag = gl_label_get_default_font_italic_flag (label);
                 ltext->priv->align            = gl_label_get_default_text_alignment (label);
+                ltext->priv->valign           = gl_label_get_default_text_valignment (label);
                ltext->priv->color_node       = color_node;       
                 ltext->priv->line_spacing     = gl_label_get_default_text_line_spacing (label);
 
@@ -328,6 +338,7 @@ copy (glLabelObject *dst_object,
        new_ltext->priv->font_italic_flag = ltext->priv->font_italic_flag;
        set_text_color (dst_object, text_color_node, FALSE);
        new_ltext->priv->align            = ltext->priv->align;
+       new_ltext->priv->valign           = ltext->priv->valign;
        new_ltext->priv->line_spacing     = ltext->priv->line_spacing;
        new_ltext->priv->auto_shrink      = ltext->priv->auto_shrink;
 
@@ -733,6 +744,39 @@ set_text_alignment (glLabelObject    *object,
 }
 
 
+/*****************************************************************************/
+/* Set vertical text alignment method.                                       */
+/*****************************************************************************/
+static void
+set_text_valignment (glLabelObject    *object,
+                    glValignment      text_valignment,
+                     gboolean          checkpoint)
+{
+       glLabelText    *ltext = (glLabelText *)object;
+        glLabel        *label;
+
+       gl_debug (DEBUG_LABEL, "START");
+
+       g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext));
+
+       if (ltext->priv->valign != text_valignment)
+        {
+                if ( checkpoint )
+                {
+                        label = gl_label_object_get_parent (GL_LABEL_OBJECT (ltext));
+                        gl_label_checkpoint (label, _("Vertically align text"));
+                }
+
+                ltext->priv->size_changed = TRUE;
+
+               ltext->priv->valign = text_valignment;
+               gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext));
+       }
+
+       gl_debug (DEBUG_LABEL, "END");
+}
+
+
 /*****************************************************************************/
 /* Set text line spacing method.                                             */
 /*****************************************************************************/
@@ -879,6 +923,22 @@ get_text_alignment (glLabelObject    *object)
 }
 
 
+/*****************************************************************************/
+/* Get vertical text alignment method.                                       */
+/*****************************************************************************/
+static glValignment
+get_text_valignment (glLabelObject    *object)
+{
+       glLabelText    *ltext = (glLabelText *)object;
+
+       gl_debug (DEBUG_LABEL, "");
+
+       g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), GTK_JUSTIFY_LEFT);
+
+       return ltext->priv->valign;
+}
+
+
 /*****************************************************************************/
 /* Get text line spacing method.                                             */
 /*****************************************************************************/
@@ -1025,6 +1085,7 @@ set_text_path (glLabelText      *this,
                gboolean          screen_flag,
                glMergeRecord    *record)
 {
+        gint                  iw, ih, y;
         gdouble               object_w, object_h;
         gdouble               raw_w, raw_h;
         gchar                *text;
@@ -1092,9 +1153,22 @@ set_text_path (glLabelText      *this,
         }
         pango_layout_set_wrap (layout, PANGO_WRAP_WORD);
         pango_layout_set_alignment (layout, this->priv->align);
+        pango_layout_get_pixel_size (layout, &iw, &ih);
 
+        switch (this->priv->valign)
+        {
+        case GL_VALIGN_VCENTER:
+                y = (object_h - ih) / 2;
+                break;
+        case GL_VALIGN_BOTTOM:
+                y = object_h - ih;
+                break;
+        default:
+                y = 0;
+                break;
+        }
 
-        cairo_move_to (cr, GL_LABEL_TEXT_MARGIN, 0);
+        cairo_move_to (cr, GL_LABEL_TEXT_MARGIN, y);
         pango_cairo_layout_path (cr, layout);
 
         g_object_unref (layout);
index efa117f0b8a33c3920f94c9d3661fc1d5993e622..1a7e1b6d8d4c39de4f367320fdd34b8ef418caa6 100644 (file)
@@ -75,6 +75,7 @@ struct _glLabelPrivate {
        gboolean           default_font_italic_flag;
        guint              default_text_color;
        PangoAlignment     default_text_alignment;
+       glValignment       default_text_valignment;
        gdouble            default_text_line_spacing;
 
        /* Default object line properties */
@@ -2163,6 +2164,39 @@ gl_label_set_selection_text_alignment (glLabel        *label,
 }
 
 
+/*****************************************************************************/
+/* Set vertical text alignment for all text contained in selected objects.   */
+/*****************************************************************************/
+void
+gl_label_set_selection_text_valignment (glLabel        *label,
+                                        glValignment    text_valignment)
+{
+        GList         *selection_list;
+       GList         *p;
+       glLabelObject *object;
+
+       gl_debug (DEBUG_LABEL, "START");
+
+       g_return_if_fail (label && GL_IS_LABEL (label));
+
+        begin_selection_op (label);
+
+        selection_list = gl_label_get_selection_list (label);
+
+       for (p = selection_list; p != NULL; p = p->next)
+        {
+               object = GL_LABEL_OBJECT (p->data);
+               gl_label_object_set_text_valignment (object, text_valignment, TRUE);
+       }
+
+        g_list_free (selection_list);
+
+        end_selection_op (label);
+
+       gl_debug (DEBUG_LABEL, "END");
+}
+
+
 /*****************************************************************************/
 /* Set text line spacing for all text contained in selected objects.         */
 /*****************************************************************************/
@@ -2809,6 +2843,22 @@ gl_label_set_default_text_alignment (glLabel        *label,
 }
 
 
+/****************************************************************************/
+/* Set default vertical text alignment.                                     */
+/****************************************************************************/
+void
+gl_label_set_default_text_valignment (glLabel        *label,
+                                      glValignment    text_valignment)
+{
+       gl_debug (DEBUG_LABEL, "START");
+
+       g_return_if_fail (label && GL_IS_LABEL (label));
+
+       label->priv->default_text_valignment = text_valignment;
+       gl_debug (DEBUG_LABEL, "END");
+}
+
+
 /****************************************************************************/
 /* Set default text line spacing.                                           */
 /****************************************************************************/
@@ -2973,6 +3023,22 @@ gl_label_get_default_text_alignment (glLabel *label)
 }
 
 
+/****************************************************************************/
+/* Get default vertical text alignment.                                     */
+/****************************************************************************/
+glValignment
+gl_label_get_default_text_valignment (glLabel *label)
+{
+       gl_debug (DEBUG_LABEL, "START");
+
+       g_return_val_if_fail (label && GL_IS_LABEL (label), GL_VALIGN_TOP);
+
+       gl_debug (DEBUG_LABEL, "END");
+
+       return label->priv->default_text_valignment;
+}
+
+
 /****************************************************************************/
 /* Get default text line spacing.                                           */
 /****************************************************************************/
index eccd6088825c7fd569b54ccc82576ab58ef2fb6f..0d5937300c5c8c16fde64f24a5a6a8235d61fdf5 100644 (file)
@@ -289,6 +289,9 @@ void       gl_label_set_default_text_color       (glLabel            *label,
 void       gl_label_set_default_text_alignment   (glLabel            *label,
                                                   PangoAlignment     text_alignment);
 
+void       gl_label_set_default_text_valignment  (glLabel            *label,
+                                                  glValignment       text_valignment);
+
 void       gl_label_set_default_line_width       (glLabel            *label,
                                                   gdouble            line_width);
 
@@ -313,6 +316,8 @@ guint            gl_label_get_default_text_color       (glLabel            *labe
 
 PangoAlignment   gl_label_get_default_text_alignment   (glLabel            *label);
 
+glValignment     gl_label_get_default_text_valignment  (glLabel            *label);
+
 gdouble          gl_label_get_default_text_line_spacing(glLabel            *label);
 
 gdouble          gl_label_get_default_line_width       (glLabel            *label);
index 053bcdea1bee59ca95430b7c68c650904ab02090..9e778b5b991298e53c9baa9d5eb5e88ab987b11c 100644 (file)
@@ -114,6 +114,9 @@ struct _glObjectEditorPrivate {
        GtkWidget  *text_left_toggle;
        GtkWidget  *text_center_toggle;
        GtkWidget  *text_right_toggle;
+       GtkWidget  *text_top_toggle;
+       GtkWidget  *text_vcenter_toggle;
+       GtkWidget  *text_bottom_toggle;
        GtkWidget  *text_line_spacing_spin;
        GtkWidget  *text_auto_shrink_check;
 
@@ -326,6 +329,11 @@ void        gl_object_editor_set_text_alignment   (glObjectEditor      *editor,
 
 PangoAlignment gl_object_editor_get_text_alignment (glObjectEditor      *editor);
 
+void        gl_object_editor_set_text_valignment  (glObjectEditor      *editor,
+                                                  glValignment         text_valignment);
+
+glValignment gl_object_editor_get_text_valignment (glObjectEditor       *editor);
+
 void        gl_object_editor_set_text_line_spacing (glObjectEditor      *editor,
                                                   gdouble               text_line_spacing);
 
index 7c82ec900740d3583a8d140c05f120d4bf70305b..6acf71a4942ffba550fc7ba5d2a1cb7dfeab5eb6 100644 (file)
@@ -60,6 +60,8 @@
 
 static void align_toggle_cb (GtkToggleButton *toggle,
                             glObjectEditor  *editor);
+static void valign_toggle_cb (GtkToggleButton *toggle,
+                             glObjectEditor  *editor);
 static void text_radio_toggled_cb              (glObjectEditor        *editor);
 
 
@@ -85,6 +87,9 @@ gl_object_editor_prepare_text_page (glObjectEditor       *editor)
                                      "text_left_toggle",       &editor->priv->text_left_toggle,
                                      "text_center_toggle",     &editor->priv->text_center_toggle,
                                      "text_right_toggle",      &editor->priv->text_right_toggle,
+                                     "text_top_toggle",        &editor->priv->text_top_toggle,
+                                     "text_vcenter_toggle",    &editor->priv->text_vcenter_toggle,
+                                     "text_bottom_toggle",     &editor->priv->text_bottom_toggle,
                                      "text_line_spacing_spin", &editor->priv->text_line_spacing_spin,
                                      "text_auto_shrink_check", &editor->priv->text_auto_shrink_check,
                                      NULL);
@@ -162,6 +167,19 @@ gl_object_editor_prepare_text_page (glObjectEditor       *editor)
                          G_CALLBACK (align_toggle_cb),
                          G_OBJECT (editor));
 
+       g_signal_connect (G_OBJECT (editor->priv->text_top_toggle),
+                         "toggled",
+                         G_CALLBACK (valign_toggle_cb),
+                         G_OBJECT (editor));
+       g_signal_connect (G_OBJECT (editor->priv->text_vcenter_toggle),
+                         "toggled",
+                         G_CALLBACK (valign_toggle_cb),
+                         G_OBJECT (editor));
+       g_signal_connect (G_OBJECT (editor->priv->text_bottom_toggle),
+                         "toggled",
+                         G_CALLBACK (valign_toggle_cb),
+                         G_OBJECT (editor));
+
        g_signal_connect_swapped (G_OBJECT (editor->priv->text_line_spacing_spin),
                                  "value-changed",
                                  G_CALLBACK (gl_object_editor_changed_cb),
@@ -216,6 +234,46 @@ align_toggle_cb (GtkToggleButton *toggle,
 }
 
 
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Vertical alignment togglebutton callback.                      */
+/*--------------------------------------------------------------------------*/
+static void
+valign_toggle_cb (GtkToggleButton *toggle,
+                glObjectEditor  *editor)
+{
+        if (gtk_toggle_button_get_active (toggle)) {
+
+                if (GTK_WIDGET (toggle) == GTK_WIDGET (editor->priv->text_top_toggle)) {
+                        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
+                                                      (editor->priv->text_vcenter_toggle),
+                                                      FALSE);
+                        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
+                                                      (editor->priv->text_bottom_toggle),
+                                                      FALSE);
+                } else if (GTK_WIDGET (toggle) ==
+                           GTK_WIDGET (editor->priv->text_vcenter_toggle)) {
+                        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
+                                                      (editor->priv->text_top_toggle),
+                                                      FALSE);
+                        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
+                                                      (editor->priv->text_bottom_toggle),
+                                                      FALSE);
+                } else if (GTK_WIDGET (toggle) ==
+                           GTK_WIDGET (editor->priv->text_bottom_toggle)) {
+                        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
+                                                      (editor->priv->text_top_toggle),
+                                                      FALSE);
+                        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
+                                                      (editor->priv->text_vcenter_toggle),
+                                                      FALSE);
+                }
+
+                gl_object_editor_changed_cb (editor);
+        }
+
+}
+
+
 /*****************************************************************************/
 /* Set font family.                                                          */
 /*****************************************************************************/
@@ -477,6 +535,69 @@ gl_object_editor_get_text_alignment (glObjectEditor      *editor)
 }
 
 
+/*****************************************************************************/
+/* Set vertical text alignment.                                              */
+/*****************************************************************************/
+void
+gl_object_editor_set_text_valignment (glObjectEditor      *editor,
+                                     glValignment         valign)
+{
+       gl_debug (DEBUG_EDITOR, "START");
+
+
+        g_signal_handlers_block_by_func (G_OBJECT (editor->priv->text_top_toggle), valign_toggle_cb, editor);
+        g_signal_handlers_block_by_func (G_OBJECT (editor->priv->text_vcenter_toggle), valign_toggle_cb, editor);
+        g_signal_handlers_block_by_func (G_OBJECT (editor->priv->text_bottom_toggle), valign_toggle_cb, editor);
+
+
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_top_toggle),
+                                      (valign == GL_VALIGN_TOP));
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_vcenter_toggle),
+                                      (valign == GL_VALIGN_VCENTER));
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_bottom_toggle),
+                                      (valign == GL_VALIGN_BOTTOM));
+
+
+        g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->text_top_toggle), valign_toggle_cb, editor);
+        g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->text_vcenter_toggle), valign_toggle_cb, editor);
+        g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->text_bottom_toggle), valign_toggle_cb, editor);
+
+
+       gl_debug (DEBUG_EDITOR, "END");
+}
+
+
+/*****************************************************************************/
+/* Query vertical text alignment.                                            */
+/*****************************************************************************/
+glValignment
+gl_object_editor_get_text_valignment (glObjectEditor      *editor)
+{
+       glValignment valign;
+
+       gl_debug (DEBUG_EDITOR, "START");
+
+        if (gtk_toggle_button_get_active
+            (GTK_TOGGLE_BUTTON (editor->priv->text_top_toggle))) {
+                valign = GL_VALIGN_TOP;
+        } else
+            if (gtk_toggle_button_get_active
+                (GTK_TOGGLE_BUTTON (editor->priv->text_bottom_toggle))) {
+                valign = GL_VALIGN_BOTTOM;
+        } else
+            if (gtk_toggle_button_get_active
+                (GTK_TOGGLE_BUTTON (editor->priv->text_vcenter_toggle))) {
+                valign = GL_VALIGN_VCENTER;
+        } else {
+                valign = GL_VALIGN_TOP;       /* Should not happen. */
+        }
+
+       gl_debug (DEBUG_EDITOR, "END");
+
+       return valign;
+}
+
+
 /*****************************************************************************/
 /* Set text color.                                                           */
 /*****************************************************************************/
index 68cfa4930b9944c1d0c755704e9f14112aa7860a..abbce239666a24b697e2e1e1cdfe1bac805fe398 100644 (file)
@@ -749,6 +749,7 @@ object_changed_cb (glLabelObject  *object,
         gboolean             font_italic_flag;
         glColorNode         *text_color_node;
         PangoAlignment       align;
+        glValignment          valign;
         gdouble              text_line_spacing;
         gboolean             auto_shrink;
         gdouble              image_w, image_h;
@@ -825,6 +826,7 @@ object_changed_cb (glLabelObject  *object,
                 font_italic_flag  = gl_label_object_get_font_italic_flag (object);
                 text_color_node   = gl_label_object_get_text_color (object);
                 align             = gl_label_object_get_text_alignment (object);
+                valign            = gl_label_object_get_text_valignment (object);
                 text_line_spacing = gl_label_object_get_text_line_spacing (object);
                 auto_shrink       = gl_label_text_get_auto_shrink (GL_LABEL_TEXT (object));
 
@@ -835,6 +837,7 @@ object_changed_cb (glLabelObject  *object,
                 gl_object_editor_set_font_italic_flag (editor, font_italic_flag);
                 gl_object_editor_set_text_color (editor, (merge != NULL), text_color_node);
                 gl_object_editor_set_text_alignment (editor, align);
+                gl_object_editor_set_text_valignment (editor, valign);
                 gl_object_editor_set_text_line_spacing (editor, text_line_spacing);
                 gl_object_editor_set_text_auto_shrink (editor, auto_shrink);
 
@@ -913,6 +916,7 @@ gl_object_editor_changed_cb (glObjectEditor *editor)
         gboolean             font_italic_flag;
         glColorNode         *text_color_node;
         PangoAlignment       align;
+        glValignment          valign;
         gdouble              text_line_spacing;
         gboolean             auto_shrink;
         glTextNode          *filename;
@@ -995,6 +999,7 @@ gl_object_editor_changed_cb (glObjectEditor *editor)
                 font_italic_flag  = gl_object_editor_get_font_italic_flag (editor);
                 text_color_node   = gl_object_editor_get_text_color (editor);
                 align             = gl_object_editor_get_text_alignment (editor);
+                valign            = gl_object_editor_get_text_valignment (editor);
                 text_line_spacing = gl_object_editor_get_text_line_spacing (editor);
                 auto_shrink       = gl_object_editor_get_text_auto_shrink (editor);
 
@@ -1004,6 +1009,7 @@ gl_object_editor_changed_cb (glObjectEditor *editor)
                 gl_label_object_set_font_italic_flag (object, font_italic_flag, TRUE);
                 gl_label_object_set_text_color (object, text_color_node, TRUE);
                 gl_label_object_set_text_alignment (object, align, TRUE);
+                gl_label_object_set_text_valignment (object, valign, TRUE);
                 gl_label_object_set_text_line_spacing (object, text_line_spacing, TRUE);
                 gl_label_text_set_auto_shrink (GL_LABEL_TEXT (object), auto_shrink, TRUE);
 
index f8c6d70a1355c2e42b23a254d0c874299a303439..deb939fe071fbd0ebf391cbe0c99676ec76dea35 100644 (file)
@@ -25,6 +25,8 @@
 #include <string.h>
 #include <math.h>
 
+#include "label-object.h"
+
 
 /****************************************************************************/
 /* Utilities to deal with PangoAlignment types.                             */
@@ -62,6 +64,42 @@ gl_str_util_string_to_align (const gchar *string)
 }
 
 
+/****************************************************************************/
+/* Utilities to deal with vertical alignment types.                         */
+/****************************************************************************/
+const gchar *
+gl_str_util_valign_to_string (glValignment valign)
+{
+       switch (valign) {
+       case GL_VALIGN_TOP:
+               return "Top";
+       case GL_VALIGN_VCENTER:
+               return "Center";
+       case GL_VALIGN_BOTTOM:
+               return "Bottom";
+       default:
+               return "?";
+       }
+}
+
+
+glValignment
+gl_str_util_string_to_valign (const gchar *string)
+{
+
+       if (g_ascii_strcasecmp (string, "Top") == 0) {
+               return GL_VALIGN_TOP;
+       } else if (g_ascii_strcasecmp (string, "Center") == 0) {
+               return GL_VALIGN_VCENTER;
+       } else if (g_ascii_strcasecmp (string, "Bottom") == 0) {
+               return GL_VALIGN_BOTTOM;
+       } else {
+               return GL_VALIGN_TOP;
+       }
+
+}
+
+
 /****************************************************************************/
 /* Utilities to deal with PangoWeight types                                 */
 /****************************************************************************/
index 4e26f5c856a9cf92354766e81df8e2452e093c76..e4eba22774f285061dbe0a0a2e9b5ed4c9de9c20 100644 (file)
@@ -59,11 +59,16 @@ struct _glUIPropertyBarPrivate {
        GtkWidget  *font_bold_toggle;
        GtkWidget  *font_italic_toggle;
 
-       /* Text alignemnt radios */
+       /* Text alignment radios */
        GtkWidget  *text_align_left_radio;
        GtkWidget  *text_align_center_radio;
        GtkWidget  *text_align_right_radio;
 
+       /* Text vertical alignment radios */
+       GtkWidget  *text_valign_top_radio;
+       GtkWidget  *text_valign_vcenter_radio;
+       GtkWidget  *text_valign_bottom_radio;
+
        /* Color combos */
         GtkWidget  *text_color_eventbox;
        GtkWidget  *text_color_button;
@@ -129,6 +134,9 @@ static void     font_italic_toggled_cb           (GtkToggleToolButton  *toggle,
 static void     text_align_toggled_cb            (GtkToggleToolButton  *toggle,
                                                  glUIPropertyBar      *this);
                                                  
+static void     text_valign_toggled_cb           (GtkToggleToolButton  *toggle,
+                                                 glUIPropertyBar      *this);
+
 static void     set_doc_items_sensitive          (glUIPropertyBar      *this,
                                                  gboolean              state);
 
@@ -251,18 +259,21 @@ gl_ui_property_bar_construct (glUIPropertyBar   *this)
        }
 
         gl_builder_util_get_widgets (builder,
-                                     "property_toolbar",        &this->priv->tool_bar,
-                                     "font_family_eventbox",    &this->priv->font_family_eventbox,
-                                     "font_size_spin",          &this->priv->font_size_spin,
-                                     "font_bold_toggle",        &this->priv->font_bold_toggle,
-                                     "font_italic_toggle",      &this->priv->font_italic_toggle,
-                                     "text_align_left_radio",   &this->priv->text_align_left_radio,
-                                     "text_align_center_radio", &this->priv->text_align_center_radio,
-                                     "text_align_right_radio",  &this->priv->text_align_right_radio,
-                                     "text_color_eventbox",     &this->priv->text_color_eventbox,
-                                     "fill_color_eventbox",     &this->priv->fill_color_eventbox,
-                                     "line_color_eventbox",     &this->priv->line_color_eventbox,
-                                     "line_width_spin",         &this->priv->line_width_spin,
+                                     "property_toolbar",          &this->priv->tool_bar,
+                                     "font_family_eventbox",      &this->priv->font_family_eventbox,
+                                     "font_size_spin",            &this->priv->font_size_spin,
+                                     "font_bold_toggle",          &this->priv->font_bold_toggle,
+                                     "font_italic_toggle",        &this->priv->font_italic_toggle,
+                                     "text_align_left_radio",     &this->priv->text_align_left_radio,
+                                     "text_align_center_radio",   &this->priv->text_align_center_radio,
+                                     "text_align_right_radio",    &this->priv->text_align_right_radio,
+                                     "text_valign_top_radio",     &this->priv->text_valign_top_radio,
+                                     "text_valign_vcenter_radio", &this->priv->text_valign_vcenter_radio,
+                                     "text_valign_bottom_radio",  &this->priv->text_valign_bottom_radio,
+                                     "text_color_eventbox",       &this->priv->text_color_eventbox,
+                                     "fill_color_eventbox",       &this->priv->fill_color_eventbox,
+                                     "line_color_eventbox",       &this->priv->line_color_eventbox,
+                                     "line_width_spin",           &this->priv->line_width_spin,
                                      NULL);
 
        gtk_container_add (GTK_CONTAINER (this), this->priv->tool_bar);
@@ -344,6 +355,17 @@ gl_ui_property_bar_construct (glUIPropertyBar   *this)
        g_signal_connect (G_OBJECT (this->priv->text_align_right_radio),
                          "toggled", G_CALLBACK (text_align_toggled_cb), this);
 
+       /* Text vertical alignment radio group */
+       gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_top_radio), TRUE);
+       g_signal_connect (G_OBJECT (this->priv->text_valign_top_radio),
+                         "toggled", G_CALLBACK (text_valign_toggled_cb), this);
+       gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_vcenter_radio), FALSE);
+       g_signal_connect (G_OBJECT (this->priv->text_valign_vcenter_radio),
+                         "toggled", G_CALLBACK (text_valign_toggled_cb), this);
+       gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_bottom_radio), FALSE);
+       g_signal_connect (G_OBJECT (this->priv->text_valign_bottom_radio),
+                         "toggled", G_CALLBACK (text_valign_toggled_cb), this);
+
        /* Text color widget */
        gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->text_color_button),
                                          gl_prefs_model_get_default_text_color (gl_prefs));
@@ -404,6 +426,13 @@ reset_to_default_properties (glLabel         *label,
        gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_right_radio),
                                           (gl_label_get_default_text_alignment (label) == PANGO_ALIGN_RIGHT));
 
+       gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_top_radio),
+                                          (gl_label_get_default_text_valignment (label) == GL_VALIGN_TOP));
+       gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_vcenter_radio),
+                                          (gl_label_get_default_text_valignment (label) == GL_VALIGN_VCENTER));
+       gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_bottom_radio),
+                                          (gl_label_get_default_text_valignment (label) == GL_VALIGN_BOTTOM));
+
        gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON(this->priv->text_color_button),
                                          gl_label_get_default_text_color (label));
 
@@ -455,7 +484,7 @@ update_text_properties (glLabel         *label,
        gboolean        can_text, is_first_object;
        gboolean        is_same_font_family, is_same_font_size;
        gboolean        is_same_text_color, is_same_is_italic;
-       gboolean        is_same_is_bold, is_same_align;
+       gboolean        is_same_is_bold, is_same_align, is_same_valign;
        GList          *selection_list;
        GList          *p;
        glLabelObject  *object;
@@ -466,6 +495,7 @@ update_text_properties (glLabel         *label,
        gboolean        selection_is_italic, is_italic;
        gboolean        selection_is_bold, is_bold;
        PangoAlignment  selection_align, align;
+       glValignment    selection_valign, valign;
 
        can_text = gl_label_can_selection_text (label);
        set_text_items_sensitive (this, can_text);
@@ -476,6 +506,7 @@ update_text_properties (glLabel         *label,
        is_same_is_italic =
        is_same_is_bold =
        is_same_align =
+       is_same_valign =
        is_same_text_color =
        is_same_font_size =
        is_same_font_family = TRUE;
@@ -531,6 +562,7 @@ update_text_properties (glLabel         *label,
                is_italic = gl_label_object_get_font_italic_flag (object);
                is_bold = gl_label_object_get_font_weight (object) == PANGO_WEIGHT_BOLD;
                align = gl_label_object_get_text_alignment (object);
+               valign = gl_label_object_get_text_valignment (object);
 
                if (is_first_object)
                 {
@@ -539,6 +571,7 @@ update_text_properties (glLabel         *label,
                        selection_is_italic = is_italic;
                        selection_is_bold = is_bold;
                        selection_align = align;
+                       selection_valign = valign;
                }
                 else
                 {
@@ -552,6 +585,8 @@ update_text_properties (glLabel         *label,
                                is_same_is_bold = FALSE;
                        if (align != selection_align)
                                is_same_align = FALSE;
+                       if (valign != selection_valign)
+                               is_same_valign = FALSE;
                }
                is_first_object = FALSE;
        }
@@ -611,6 +646,18 @@ update_text_properties (glLabel         *label,
        gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_right_radio),
                                           (selection_align == PANGO_ALIGN_RIGHT) &&
                                           is_same_align);
+
+       if (is_same_valign)
+               gl_debug (DEBUG_PROPERTY_BAR, "same valign");
+       gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_top_radio),
+                                          (selection_valign == GL_VALIGN_TOP) &&
+                                          is_same_valign);
+       gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_vcenter_radio),
+                                          (selection_valign == GL_VALIGN_VCENTER) &&
+                                          is_same_valign);
+       gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_bottom_radio),
+                                          (selection_valign == GL_VALIGN_BOTTOM) &&
+                                          is_same_valign);
 }
 
 
@@ -1170,6 +1217,48 @@ text_align_toggled_cb (GtkToggleToolButton  *toggle,
 }
 
 
+/*---------------------------------------------------------------------------*/
+/* PRIVATE.  Text vertical align toggled callback.                           */
+/*---------------------------------------------------------------------------*/
+static void
+text_valign_toggled_cb (GtkToggleToolButton  *toggle,
+                       glUIPropertyBar      *this)
+{
+       if (this->priv->stop_signals) return;
+       this->priv->stop_signals = TRUE;
+
+       gl_debug (DEBUG_PROPERTY_BAR, "START");
+
+       if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_top_radio)))
+       {
+               gl_label_set_selection_text_valignment (this->priv->label,
+                                                        GL_VALIGN_TOP);
+               gl_label_set_default_text_valignment   (this->priv->label,
+                                                        GL_VALIGN_TOP);
+       }
+
+       if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_vcenter_radio)))
+       {
+               gl_label_set_selection_text_valignment (this->priv->label,
+                                                        GL_VALIGN_VCENTER);
+               gl_label_set_default_text_valignment   (this->priv->label,
+                                                        GL_VALIGN_VCENTER);
+       }
+
+       if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_valign_bottom_radio)))
+       {
+               gl_label_set_selection_text_valignment (this->priv->label,
+                                                        GL_VALIGN_BOTTOM);
+               gl_label_set_default_text_valignment   (this->priv->label,
+                                                        GL_VALIGN_BOTTOM);
+       }
+
+       gl_debug (DEBUG_PROPERTY_BAR, "END");
+
+       this->priv->stop_signals = FALSE;
+}
+
+
 /*---------------------------------------------------------------------------*/
 /* PRIVATE.  Set sensitivity of doc controls.                                */
 /*---------------------------------------------------------------------------*/
@@ -1177,17 +1266,20 @@ static void
 set_doc_items_sensitive (glUIPropertyBar      *this,
                         gboolean              state)
 {
-       gtk_widget_set_sensitive (this->priv->font_family_combo,       state);
-       gtk_widget_set_sensitive (this->priv->font_size_spin,          state);
-       gtk_widget_set_sensitive (this->priv->font_bold_toggle,        state);
-       gtk_widget_set_sensitive (this->priv->font_italic_toggle,      state);
-       gtk_widget_set_sensitive (this->priv->text_align_left_radio,   state);
-       gtk_widget_set_sensitive (this->priv->text_align_center_radio, state);
-       gtk_widget_set_sensitive (this->priv->text_align_right_radio,  state);
-       gtk_widget_set_sensitive (this->priv->text_color_button,       state);
-       gtk_widget_set_sensitive (this->priv->fill_color_button,       state);
-       gtk_widget_set_sensitive (this->priv->line_color_button,       state);
-       gtk_widget_set_sensitive (this->priv->line_width_spin,         state);
+       gtk_widget_set_sensitive (this->priv->font_family_combo,         state);
+       gtk_widget_set_sensitive (this->priv->font_size_spin,            state);
+       gtk_widget_set_sensitive (this->priv->font_bold_toggle,          state);
+       gtk_widget_set_sensitive (this->priv->font_italic_toggle,        state);
+       gtk_widget_set_sensitive (this->priv->text_align_left_radio,     state);
+       gtk_widget_set_sensitive (this->priv->text_align_center_radio,   state);
+       gtk_widget_set_sensitive (this->priv->text_align_right_radio,    state);
+       gtk_widget_set_sensitive (this->priv->text_valign_top_radio,     state);
+       gtk_widget_set_sensitive (this->priv->text_valign_vcenter_radio, state);
+       gtk_widget_set_sensitive (this->priv->text_valign_bottom_radio,  state);
+       gtk_widget_set_sensitive (this->priv->text_color_button,         state);
+       gtk_widget_set_sensitive (this->priv->fill_color_button,         state);
+       gtk_widget_set_sensitive (this->priv->line_color_button,         state);
+       gtk_widget_set_sensitive (this->priv->line_width_spin,           state);
 }
 
 
@@ -1198,14 +1290,17 @@ static void
 set_text_items_sensitive (glUIPropertyBar      *this,
                          gboolean              state)
 {
-       gtk_widget_set_sensitive (this->priv->font_family_combo,       state);
-       gtk_widget_set_sensitive (this->priv->font_size_spin,          state);
-       gtk_widget_set_sensitive (this->priv->font_bold_toggle,        state);
-       gtk_widget_set_sensitive (this->priv->font_italic_toggle,      state);
-       gtk_widget_set_sensitive (this->priv->text_align_left_radio,   state);
-       gtk_widget_set_sensitive (this->priv->text_align_center_radio, state);
-       gtk_widget_set_sensitive (this->priv->text_align_right_radio,  state);
-       gtk_widget_set_sensitive (this->priv->text_color_button,       state);
+       gtk_widget_set_sensitive (this->priv->font_family_combo,         state);
+       gtk_widget_set_sensitive (this->priv->font_size_spin,            state);
+       gtk_widget_set_sensitive (this->priv->font_bold_toggle,          state);
+       gtk_widget_set_sensitive (this->priv->font_italic_toggle,        state);
+       gtk_widget_set_sensitive (this->priv->text_align_left_radio,     state);
+       gtk_widget_set_sensitive (this->priv->text_align_center_radio,   state);
+       gtk_widget_set_sensitive (this->priv->text_align_right_radio,    state);
+       gtk_widget_set_sensitive (this->priv->text_valign_top_radio,     state);
+       gtk_widget_set_sensitive (this->priv->text_valign_vcenter_radio, state);
+       gtk_widget_set_sensitive (this->priv->text_valign_bottom_radio,  state);
+       gtk_widget_set_sensitive (this->priv->text_color_button,         state);
 }
 
 
index 79b4646938622d8b70633937ef32e30eff7fb0e5..f7743fd5b8da0264c17cf936bc57a4750abef596 100644 (file)
@@ -436,6 +436,7 @@ xml_parse_object_text (xmlNodePtr  node,
        gdouble           w, h;
        gchar            *string;
        PangoAlignment    align;
+       glValignment      valign;
        gboolean          auto_shrink;
        xmlNodePtr        child;
 
@@ -459,6 +460,12 @@ xml_parse_object_text (xmlNodePtr  node,
        g_free (string);
        gl_label_object_set_text_alignment (GL_LABEL_OBJECT(object), align, FALSE);
 
+       /* valign attr */
+       string = lgl_xml_get_prop_string (node, "valign", NULL);
+       valign = gl_str_util_string_to_valign (string);
+       g_free (string);
+       gl_label_object_set_text_valignment (GL_LABEL_OBJECT(object), valign, FALSE);
+
        /* auto_shrink attr */
        auto_shrink = lgl_xml_get_prop_boolean (node, "auto_shrink", FALSE);
        gl_label_text_set_auto_shrink (GL_LABEL_TEXT(object), auto_shrink, FALSE);
@@ -1321,6 +1328,7 @@ xml_create_object_text (xmlNodePtr     parent,
        gdouble           x, y;
        gdouble           w, h;
        PangoAlignment    align;
+       glValignment      valign;
        gboolean          auto_shrink;
 
        gl_debug (DEBUG_XML, "START");
@@ -1341,6 +1349,10 @@ xml_create_object_text (xmlNodePtr     parent,
        align = gl_label_object_get_text_alignment (object);
        lgl_xml_set_prop_string (node, "justify", gl_str_util_align_to_string (align));
 
+       /* valign attr */
+       valign = gl_label_object_get_text_valignment (object);
+       lgl_xml_set_prop_string (node, "valign", gl_str_util_valign_to_string (valign));
+
        /* auto_shrink attr */
        auto_shrink = gl_label_text_get_auto_shrink (GL_LABEL_TEXT (object));
        lgl_xml_set_prop_boolean (node, "auto_shrink", auto_shrink);
index 5e745535681a2ada7af22af5551fc80f6bdd1f7f..7e8dcc1357f9c8eeabf91e855c2b8579b5f7e326 100644 (file)
@@ -41,6 +41,7 @@
 
 <!-- Text related enumerations/types -->
 <!ENTITY % JUSTIFY_TYPE       "(Left | Right | Center)">
+<!ENTITY % VALIGN_TYPE        "(Top | Bottom | Center)">
 <!ENTITY % FONT_WEIGHT_TYPE   "(Regular | Bold)">
 
 <!-- Barcode related enumerations/types -->
                  %position_attrs;
                  %size_attrs;
                  justify         %JUSTIFY_TYPE;          #REQUIRED
+                 valign          %VALIGN_TYPE;           #REQUIRED
                  auto_shrink     %BOOLEAN_TYPE;          #IMPLIED
                  %affine_attrs;
                  %shadow_attrs;