Remove remaining vestiges of coloured text from the partition list
This commit stopped setting the text colours in the Partition, File System and Mount Point columns to avoid hard coding text colours making them impossible to read when using GNOME's High Contrast Inverse theme:ff2a6c00dd
Changes post gparted-0.3.6 - code recreation from Source Forge * src/TreeView_Detail.cc: Removed text_color hard coding - Removed hard coding of Partition and Filesystem text_color which was based on if partition was TYPE_UNALLOCATED. - Removed hard coding of Mount text_color which was based on if partition was busy. Lock symbol provides this indicator. - Closes GParted bug #413810 - Don't hardcode text colour in partition list Now remove the remaining vestiges left behind. Remove the unused color text and mount_text_color columns from the tree model. Also remove setting of the column attributes which set the colour of the text in the tree view from those unused columns in the tree model. Unnecessary history. Added by:b179990dc9
show greyed-out mountpoint of unmounted partitions in the treeview as an improved way to identify partitions Bug #333027 - Displaying unmounted partitions' default mount points in grey and by commit only in CVS history: Bart Hakvoort <...> 2004-08-22 15:06:45 Made text in Partition column darkgrey for unallocated. this offers more visual difference between partitions and unallocated space
This commit is contained in:
parent
c6d29aa7e8
commit
85b6858702
|
@ -77,8 +77,6 @@ private:
|
|||
Gtk::TreeModelColumn<Glib::ustring> used;
|
||||
Gtk::TreeModelColumn<Glib::ustring> unused;
|
||||
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > color ;
|
||||
Gtk::TreeModelColumn<Glib::ustring> text_color;
|
||||
Gtk::TreeModelColumn<Glib::ustring> mount_text_color;
|
||||
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > icon1 ;
|
||||
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > icon2 ;
|
||||
Gtk::TreeModelColumn<Glib::ustring> flags;
|
||||
|
@ -89,8 +87,7 @@ private:
|
|||
{
|
||||
add( path ); add( name ); add( filesystem ); add( mountpoint ); add( label );
|
||||
add( size ); add( used ); add( unused ); add( color );
|
||||
add( text_color ); add( mount_text_color ); add( icon1 );
|
||||
add( icon2 ); add( flags ); add( partition_ptr );
|
||||
add( icon1 ); add( icon2 ); add( flags ); add( partition_ptr );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
#include "../include/PartitionLUKS.h"
|
||||
#include "../include/PartitionVector.h"
|
||||
|
||||
#include <vector>
|
||||
#include <gtkmm/cellrenderer.h>
|
||||
#include <gtkmm/cellrenderertext.h>
|
||||
|
||||
namespace GParted
|
||||
{
|
||||
|
||||
|
@ -44,37 +48,19 @@ TreeView_Detail::TreeView_Detail()
|
|||
append_column( _("Unused"), treeview_detail_columns .unused );
|
||||
append_column( _("Flags"), treeview_detail_columns .flags );
|
||||
|
||||
//icons
|
||||
// Tree view column "Partition"; add icon cells.
|
||||
get_column( 0 ) ->pack_start( treeview_detail_columns .icon2, false );
|
||||
get_column( 0 ) ->pack_start( treeview_detail_columns .icon1, false );
|
||||
|
||||
//PARTITION
|
||||
//colored text in Partition column
|
||||
Gtk::CellRendererText *cell_renderer_text =
|
||||
dynamic_cast<Gtk::CellRendererText*>( get_column( 0 ) ->get_first_cell_renderer() );
|
||||
get_column( 0 ) ->add_attribute( cell_renderer_text ->property_foreground(),
|
||||
treeview_detail_columns .text_color );
|
||||
|
||||
//FILE SYSTEM
|
||||
//file system text
|
||||
// Tree view column "File System"; add file system text cell.
|
||||
get_column( 2 )->pack_start( treeview_detail_columns.filesystem, true );
|
||||
|
||||
//colored text in File System column
|
||||
std::vector<Gtk::CellRenderer*> renderers = get_column( 2 )->get_cell_renderers();
|
||||
cell_renderer_text = dynamic_cast<Gtk::CellRendererText*>( renderers .back() ) ;
|
||||
get_column( 2 )->add_attribute( cell_renderer_text->property_foreground(),
|
||||
treeview_detail_columns.text_color );
|
||||
|
||||
//pixbuf and text are both left aligned
|
||||
// Color pixbuf cell is left aligned.
|
||||
get_column( 2 )->get_first_cell_renderer()->property_xalign() = Gtk::ALIGN_LEFT;
|
||||
// File system text cell is left aligned.
|
||||
std::vector<Gtk::CellRenderer*> renderers = get_column( 2 )->get_cell_renderers();
|
||||
Gtk::CellRendererText *cell_renderer_text = dynamic_cast<Gtk::CellRendererText*>( renderers.back() );
|
||||
cell_renderer_text ->property_xalign() = Gtk::ALIGN_LEFT ;
|
||||
|
||||
//MOUNT POINT
|
||||
//colored text in mount point column
|
||||
cell_renderer_text = dynamic_cast<Gtk::CellRendererText*>( get_column( 3 )->get_first_cell_renderer() );
|
||||
get_column( 3 )->add_attribute( cell_renderer_text->property_foreground(),
|
||||
treeview_detail_columns.mount_text_color );
|
||||
|
||||
//set alignment of numeric columns to right
|
||||
for( short t = 5 ; t < 8 ; t++ )
|
||||
get_column_cell_renderer( t ) ->property_xalign() = 1 ;
|
||||
|
|
Loading…
Reference in New Issue