[gparted] Place partition information percentages in their own column (#690542)



commit b271e367ea00bcb4a362ff578d08ee089d65ae0c
Author: Curtis Gedak <gedakc gmail com>
Date:   Sun Apr 13 13:14:31 2014 -0600

    Place partition information percentages in their own column (#690542)
    
    On some desktop environments, such as Unity on Ubuntu 13.04, the
    partition information dialog can display the used/unused/unallocated
    field values overlapping with the "(##%)" percentage value.  The problem
    is pronounced for values with 4 digits to the left of the decimal (for
    example a 1024 MiB partition ).  To address this problem, these
    percentages are placed in their own column.
    
    Bug 690542 - Partition Information Dialog Warning not readable

 src/Dialog_Partition_Info.cc |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/Dialog_Partition_Info.cc b/src/Dialog_Partition_Info.cc
index 69b4bbc..365ee61 100644
--- a/src/Dialog_Partition_Info.cc
+++ b/src/Dialog_Partition_Info.cc
@@ -180,13 +180,13 @@ void Dialog_Partition_Info::Display_Info()
        //The information in this area is in table format.
        //
        //For example:
-       //<------------------ Column Numbers --------------------->
-       //0 1            2             3             4            5
-       //+-+------------+-------------+-------------+------------+
+       //<-------------------------- Column Numbers ----------------------------->
+       //0 1            2             3             4            5               6
+       //+-+------------+-------------+-------------+------------+---------------+
        //Section
-       //  Field Left:  Value Left    Field Right:  Value Right
-       //+-+------------+-------------+-------------+------------+
-       //0 1            2             3             4            5
+       //  Field Left:  Value Left    Field Right:  Value Right  Optional Right
+       //+-+------------+-------------+-------------+------------+---------------+
+       //0 1            2             3             4            5               6
 
        Sector ptn_sectors = partition .get_sector_length() ;
 
@@ -208,7 +208,7 @@ void Dialog_Partition_Info::Display_Info()
        //FILE SYSTEM DETAIL SECTION
        //file system headline
        table ->attach( * Utils::mk_label( "<b>" + Glib::ustring( _("File System") ) + "</b>" ),
-                       0, 5,
+                       0, 6,
                        top++, bottom++,
                        Gtk::FILL ) ;
 
@@ -399,8 +399,8 @@ void Dialog_Partition_Info::Display_Info()
                                4, 5,
                                topright, bottomright,
                                Gtk::FILL ) ;
-               table ->attach( * Utils::mk_label( "\t\t\t( " + Utils::num_to_str( percent_used ) + "% )"),
-                               4, 5,
+               table ->attach( * Utils::mk_label( "( " + Utils::num_to_str( percent_used ) + "% )"),
+                               5, 6,
                                topright++, bottomright++,
                                Gtk::FILL ) ;
 
@@ -413,8 +413,8 @@ void Dialog_Partition_Info::Display_Info()
                                4, 5,
                                topright, bottomright,
                                Gtk::FILL ) ;
-               table ->attach( * Utils::mk_label( "\t\t\t( " + Utils::num_to_str( percent_unused ) + "% )"),
-                               4, 5,
+               table ->attach( * Utils::mk_label( "( " + Utils::num_to_str( percent_unused ) + "% )"),
+                               5, 6,
                                topright++, bottomright++,
                                Gtk::FILL ) ;
 
@@ -430,8 +430,8 @@ void Dialog_Partition_Info::Display_Info()
                                        4, 5,
                                        topright, bottomright,
                                        Gtk::FILL ) ;
-                       table ->attach( * Utils::mk_label( "\t\t\t( " + Utils::num_to_str( 
percent_unallocated ) + "% )"),
-                                       4, 5,
+                       table ->attach( * Utils::mk_label( "( " + Utils::num_to_str( percent_unallocated ) + 
"% )"),
+                                       5, 6,
                                        topright++, bottomright++,
                                        Gtk::FILL ) ;
                }
@@ -452,12 +452,12 @@ void Dialog_Partition_Info::Display_Info()
        bottom = std::max( bottom, bottomright );
 
        //one blank line
-       table ->attach( * Utils::mk_label( "" ), 0, 5, top++, bottom++, Gtk::FILL ) ;
+       table ->attach( * Utils::mk_label( "" ), 0, 6, top++, bottom++, Gtk::FILL ) ;
 
        //PARTITION DETAIL SECTION
        //partition headline
        table ->attach( * Utils::mk_label( "<b>" + Glib::ustring( _("Partition") ) + "</b>" ),
-                       0, 5,
+                       0, 6,
                        top++, bottom++,
                        Gtk::FILL ) ;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]