summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-10-13 18:00:19 +0200
committerGravatar waker <wakeroid@gmail.com>2011-10-13 18:00:19 +0200
commitdb6924c3aa3ccb7263701b4af41414747ec322c3 (patch)
treecd3e35bdb8316fbff4acf56dbf486922f32c2b23 /plugins
parentd0938b8c250b7da817b653580311cf9c1bab38f1 (diff)
[gtkui] better alignment of sliders in playback settings
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/deadbeef.glade316
-rw-r--r--plugins/gtkui/interface.c43
2 files changed, 201 insertions, 158 deletions
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade
index 0e5c539b..3253a4f7 100644
--- a/plugins/gtkui/deadbeef.glade
+++ b/plugins/gtkui/deadbeef.glade
@@ -2674,90 +2674,107 @@ Album</property>
</child>
<child>
- <widget class="GtkHBox" id="hbox100">
+ <widget class="GtkTable" id="table1">
<property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="spacing">8</property>
+ <property name="row_spacing">0</property>
+ <property name="column_spacing">8</property>
<child>
- <widget class="GtkLabel" id="label124">
+ <widget class="GtkHBox" id="hbox100">
<property name="visible">True</property>
- <property name="label" translatable="yes">Replaygain preamp:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <property name="homogeneous">False</property>
+ <property name="spacing">8</property>
- <child>
- <widget class="GtkLabel" id="label125">
- <property name="visible">True</property>
- <property name="label" translatable="yes">-12 dB</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label125">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">-12 dB</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkHScale" id="replaygain_preamp">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">True</property>
- <property name="value_pos">GTK_POS_BOTTOM</property>
- <property name="digits">0</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">0 -12 12 0 0 0</property>
- <signal name="value_changed" handler="on_replaygain_preamp_value_changed" last_modification_time="Sat, 12 Mar 2011 14:20:29 GMT"/>
+ <child>
+ <widget class="GtkHScale" id="replaygain_preamp">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="draw_value">True</property>
+ <property name="value_pos">GTK_POS_BOTTOM</property>
+ <property name="digits">0</property>
+ <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+ <property name="inverted">False</property>
+ <property name="adjustment">0 -12 12 0 0 0</property>
+ <signal name="value_changed" handler="on_replaygain_preamp_value_changed" last_modification_time="Sat, 12 Mar 2011 14:20:29 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label126">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">+12 dB</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label126">
+ <widget class="GtkLabel" id="label124">
<property name="visible">True</property>
- <property name="label" translatable="yes">+12 dB</property>
+ <property name="label" translatable="yes">Replaygain preamp:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0.5</property>
+ <property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
@@ -2767,24 +2784,14 @@ Album</property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
</packing>
</child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox100a">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
<child>
<widget class="GtkLabel" id="label124a">
@@ -2795,7 +2802,7 @@ Album</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0.5</property>
+ <property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
@@ -2805,78 +2812,97 @@ Album</property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label125a">
+ <widget class="GtkHBox" id="hbox100a">
<property name="visible">True</property>
- <property name="label" translatable="yes">-12 dB</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <property name="homogeneous">False</property>
+ <property name="spacing">8</property>
- <child>
- <widget class="GtkHScale" id="global_preamp">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">True</property>
- <property name="value_pos">GTK_POS_BOTTOM</property>
- <property name="digits">0</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">0 -12 12 0 0 0</property>
- <signal name="value_changed" handler="on_global_preamp_value_changed" last_modification_time="Thu, 01 Sep 2011 11:40:00 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label125a">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">-12 dB</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkLabel" id="label126a">
- <property name="visible">True</property>
- <property name="label" translatable="yes">+12 dB</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
+ <child>
+ <widget class="GtkHScale" id="global_preamp">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="draw_value">True</property>
+ <property name="value_pos">GTK_POS_BOTTOM</property>
+ <property name="digits">0</property>
+ <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+ <property name="inverted">False</property>
+ <property name="adjustment">0 -12 12 0 0 0</property>
+ <signal name="value_changed" handler="on_global_preamp_value_changed" last_modification_time="Thu, 01 Sep 2011 11:40:00 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label126a">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">+12 dB</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
</packing>
</child>
</widget>
diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c
index 87331d8a..16d874b9 100644
--- a/plugins/gtkui/interface.c
+++ b/plugins/gtkui/interface.c
@@ -1662,13 +1662,14 @@ create_prefwin (void)
GtkWidget *label8;
GtkWidget *pref_replaygain_mode;
GtkWidget *pref_replaygain_scale;
+ GtkWidget *table1;
GtkWidget *hbox100;
- GtkWidget *label124;
GtkWidget *label125;
GtkWidget *replaygain_preamp;
GtkWidget *label126;
- GtkWidget *hbox100a;
+ GtkWidget *label124;
GtkWidget *label124a;
+ GtkWidget *hbox100a;
GtkWidget *label125a;
GtkWidget *global_preamp;
GtkWidget *label126a;
@@ -1877,13 +1878,16 @@ create_prefwin (void)
gtk_widget_show (pref_replaygain_scale);
gtk_box_pack_start (GTK_BOX (vbox8), pref_replaygain_scale, FALSE, FALSE, 0);
+ table1 = gtk_table_new (2, 2, FALSE);
+ gtk_widget_show (table1);
+ gtk_box_pack_start (GTK_BOX (vbox8), table1, FALSE, FALSE, 0);
+ gtk_table_set_col_spacings (GTK_TABLE (table1), 8);
+
hbox100 = gtk_hbox_new (FALSE, 8);
gtk_widget_show (hbox100);
- gtk_box_pack_start (GTK_BOX (vbox8), hbox100, FALSE, FALSE, 0);
-
- label124 = gtk_label_new (_("Replaygain preamp:"));
- gtk_widget_show (label124);
- gtk_box_pack_start (GTK_BOX (hbox100), label124, FALSE, FALSE, 0);
+ gtk_table_attach (GTK_TABLE (table1), hbox100, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
label125 = gtk_label_new (_("-12 dB"));
gtk_widget_show (label125);
@@ -1899,13 +1903,25 @@ create_prefwin (void)
gtk_widget_show (label126);
gtk_box_pack_start (GTK_BOX (hbox100), label126, FALSE, FALSE, 0);
- hbox100a = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox100a);
- gtk_box_pack_start (GTK_BOX (vbox8), hbox100a, FALSE, FALSE, 0);
+ label124 = gtk_label_new (_("Replaygain preamp:"));
+ gtk_widget_show (label124);
+ gtk_table_attach (GTK_TABLE (table1), label124, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label124), 0, 0.5);
label124a = gtk_label_new (_("Global preamp:"));
gtk_widget_show (label124a);
- gtk_box_pack_start (GTK_BOX (hbox100a), label124a, FALSE, FALSE, 0);
+ gtk_table_attach (GTK_TABLE (table1), label124a, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label124a), 0, 0.5);
+
+ hbox100a = gtk_hbox_new (FALSE, 8);
+ gtk_widget_show (hbox100a);
+ gtk_table_attach (GTK_TABLE (table1), hbox100a, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
label125a = gtk_label_new (_("-12 dB"));
gtk_widget_show (label125a);
@@ -2724,13 +2740,14 @@ create_prefwin (void)
GLADE_HOOKUP_OBJECT (prefwin, label8, "label8");
GLADE_HOOKUP_OBJECT (prefwin, pref_replaygain_mode, "pref_replaygain_mode");
GLADE_HOOKUP_OBJECT (prefwin, pref_replaygain_scale, "pref_replaygain_scale");
+ GLADE_HOOKUP_OBJECT (prefwin, table1, "table1");
GLADE_HOOKUP_OBJECT (prefwin, hbox100, "hbox100");
- GLADE_HOOKUP_OBJECT (prefwin, label124, "label124");
GLADE_HOOKUP_OBJECT (prefwin, label125, "label125");
GLADE_HOOKUP_OBJECT (prefwin, replaygain_preamp, "replaygain_preamp");
GLADE_HOOKUP_OBJECT (prefwin, label126, "label126");
- GLADE_HOOKUP_OBJECT (prefwin, hbox100a, "hbox100a");
+ GLADE_HOOKUP_OBJECT (prefwin, label124, "label124");
GLADE_HOOKUP_OBJECT (prefwin, label124a, "label124a");
+ GLADE_HOOKUP_OBJECT (prefwin, hbox100a, "hbox100a");
GLADE_HOOKUP_OBJECT (prefwin, label125a, "label125a");
GLADE_HOOKUP_OBJECT (prefwin, global_preamp, "global_preamp");
GLADE_HOOKUP_OBJECT (prefwin, label126a, "label126a");