diff options
author | monsta <[email protected]> | 2016-06-30 14:39:23 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-06-30 14:40:29 +0300 |
commit | 29a2534c7f5de5a8dc06d48b2e7c52d7416d6a6e (patch) | |
tree | ee78c9b70306b269aee0259c89692a8030ecbd5b /applets/clock/clock-location-tile.c | |
parent | 882f8f4d9959b6b27f08d2ddb525c7347df1797c (diff) | |
download | mate-panel-29a2534c7f5de5a8dc06d48b2e7c52d7416d6a6e.tar.bz2 mate-panel-29a2534c7f5de5a8dc06d48b2e7c52d7416d6a6e.tar.xz |
clock: fix UI issues introduced in 882f8f4
Diffstat (limited to 'applets/clock/clock-location-tile.c')
-rw-r--r-- | applets/clock/clock-location-tile.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c index d34b8aba..55ce68b3 100644 --- a/applets/clock/clock-location-tile.c +++ b/applets/clock/clock-location-tile.c @@ -21,8 +21,6 @@ #if GTK_CHECK_VERSION (3, 0, 0) G_DEFINE_TYPE (ClockLocationTile, clock_location_tile, GTK_TYPE_BIN) #else -#define gtk_box_new(GTK_ORIENTATION_HORIZONTAL, b) gtk_hbox_new(FALSE, b) -#define gtk_box_new(GTK_ORIENTATION_VERTICAL, b) gtk_vbox_new(FALSE, b) G_DEFINE_TYPE (ClockLocationTile, clock_location_tile, GTK_TYPE_ALIGNMENT) #endif @@ -283,18 +281,16 @@ clock_location_tile_fill (ClockLocationTile *this) g_signal_connect (priv->box, "leave-notify-event", G_CALLBACK (enter_or_leave_tile), this); -#if !GTK_CHECK_VERSION (3, 0, 0) - alignment = gtk_alignment_new (0, 0, 1, 0); - gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 3, 3, 3, 0); -#endif - - tile = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); #if GTK_CHECK_VERSION (3, 0, 0) + tile = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); gtk_widget_set_margin_top (tile, 3); gtk_widget_set_margin_bottom (tile, 3); gtk_widget_set_margin_start (tile, 3); +#else + tile = gtk_hbox_new (FALSE, 6); + alignment = gtk_alignment_new (0, 0, 1, 0); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 3, 3, 3, 0); #endif - head_section = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); priv->city_label = gtk_label_new (NULL); #if GTK_CHECK_VERSION (3, 0, 0) @@ -308,8 +304,10 @@ clock_location_tile_fill (ClockLocationTile *this) #endif #if GTK_CHECK_VERSION (3, 0, 0) + head_section = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start (GTK_BOX (head_section), priv->city_label, FALSE, FALSE, 0); #else + head_section = gtk_vbox_new (FALSE, 0); align = gtk_alignment_new (0, 0, 0, 0); gtk_alignment_set_padding (GTK_ALIGNMENT (align), 0, 0, 0, 3); gtk_container_add (GTK_CONTAINER (align), priv->city_label); @@ -335,11 +333,13 @@ clock_location_tile_fill (ClockLocationTile *this) gtk_container_add (GTK_CONTAINER (align), priv->weather_icon); #endif +#if GTK_CHECK_VERSION (3, 0, 0) box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start (GTK_BOX (head_section), box, FALSE, FALSE, 0); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_box_pack_start (GTK_BOX (box), priv->weather_icon, FALSE, FALSE, 0); #else + box = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (head_section), box, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (box), align, FALSE, FALSE, 0); #endif gtk_box_pack_start (GTK_BOX (box), priv->time_label, FALSE, FALSE, 0); |