diff --git a/include/TreeView_Detail.h b/include/TreeView_Detail.h index 059fc3b3..2fa7ff71 100644 --- a/include/TreeView_Detail.h +++ b/include/TreeView_Detail.h @@ -77,8 +77,6 @@ private: Gtk::TreeModelColumn used; Gtk::TreeModelColumn unused; Gtk::TreeModelColumn< Glib::RefPtr > color ; - Gtk::TreeModelColumn text_color; - Gtk::TreeModelColumn mount_text_color; Gtk::TreeModelColumn< Glib::RefPtr > icon1 ; Gtk::TreeModelColumn< Glib::RefPtr > icon2 ; Gtk::TreeModelColumn 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 ); } }; diff --git a/src/TreeView_Detail.cc b/src/TreeView_Detail.cc index 24debb2c..d303bb12 100644 --- a/src/TreeView_Detail.cc +++ b/src/TreeView_Detail.cc @@ -20,6 +20,10 @@ #include "../include/PartitionLUKS.h" #include "../include/PartitionVector.h" +#include +#include +#include + namespace GParted { @@ -43,37 +47,19 @@ TreeView_Detail::TreeView_Detail() append_column( _("Used"), treeview_detail_columns .used ); 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( 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 renderers = get_column( 2 )->get_cell_renderers(); - cell_renderer_text = dynamic_cast( 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 renderers = get_column( 2 )->get_cell_renderers(); + Gtk::CellRendererText *cell_renderer_text = dynamic_cast( renderers.back() ); cell_renderer_text ->property_xalign() = Gtk::ALIGN_LEFT ; - - //MOUNT POINT - //colored text in mount point column - cell_renderer_text = dynamic_cast( 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++ )