[gparted] Center the data below the partition information graphic (#690542)
- From: Mike Fleetwood <mfleetwo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Center the data below the partition information graphic (#690542)
- Date: Mon, 28 Apr 2014 07:50:53 +0000 (UTC)
commit c5f8220f606efcbd30081aa2040e4295cbdbf460
Author: Curtis Gedak <gedakc gmail com>
Date: Fri Apr 25 10:04:33 2014 -0600
Center the data below the partition information graphic (#690542)
When the partition information dialog is resized, the data below the
partition graphic would remain left aligned. Improve the aesthetics by
horizontally centering the data in the window similar to the partition
graphic.
Bug 690542 - Partition Information Dialog Warning not readable
src/Dialog_Partition_Info.cc | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/Dialog_Partition_Info.cc b/src/Dialog_Partition_Info.cc
index 89645e3..ac76646 100644
--- a/src/Dialog_Partition_Info.cc
+++ b/src/Dialog_Partition_Info.cc
@@ -19,6 +19,7 @@
#include "../include/LVM2_PV_Info.h"
#include <gtk/gtk.h>
+#include <gtkmm/alignment.h>
namespace GParted
{
@@ -55,7 +56,10 @@ Dialog_Partition_Info::Dialog_Partition_Info( const Partition & partition )
//
https://developer.gnome.org/gtkmm/2.24/classGtk_1_1ScrolledWindow.html#a17c588d56d93923841d38f0d5e2ec9d7
GtkWidget * scrollable_child = gtk_bin_get_child(GTK_BIN(info_scrolled.gobj()));
gtk_viewport_set_shadow_type(GTK_VIEWPORT(scrollable_child), GTK_SHADOW_NONE);
- this ->get_vbox() ->pack_start( info_scrolled ) ;
+ //horizontally center the information scrolled window to match partition graphic
+ Gtk::Alignment * center_widget = manage( new Gtk::Alignment(0.5, 0.5, 0.0, 1.0) ) ;
+ center_widget ->add( info_scrolled ) ;
+ this ->get_vbox() ->pack_start( *center_widget ) ;
//add label for detail and fill with relevant info
Display_Info() ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]