Commit d9647a08 authored by Hugo Pereira Da Costa's avatar Hugo Pereira Da Costa
Browse files

added option "ViewInvertSortIndicator" to inverse the tree view sort indicator arrow direction.

CCBUG: 297807
parent 6d607440
......@@ -67,6 +67,7 @@ namespace Oxygen
_viewDrawTreeBranchLines( true ),
_viewDrawTriangularExpander( true ),
_viewTriangularExpanderSize( ArrowSmall ),
_viewInvertSortIndicator( false ),
_menuHighlightMode( MM_DARK ),
_windowDragEnabled( true ),
_windowDragMode( WD_FULL ),
......@@ -881,6 +882,9 @@ namespace Oxygen
else if( expanderSize == "TE_TINY" ) _viewTriangularExpanderSize = ArrowTiny;
else _viewTriangularExpanderSize = ArrowSmall;
// invert view sort indicators
_viewInvertSortIndicator = oxygen.getOption( "[Style]", "ViewInvertSortIndicator" ).toVariant<std::string>("false") == "true";
// menu highlight mode
std::string highlightMode( oxygen.getOption( "[Style]", "MenuHighlightMode" ).toVariant<std::string>("MM_DARK") );
if( highlightMode == "MM_SUBTLE" ) _menuHighlightMode = MM_SUBTLE;
......
......@@ -167,6 +167,10 @@ namespace Oxygen
ArrowSize viewTriangularExpanderSize( void ) const
{ return _viewTriangularExpanderSize; }
//! true if views sort order indicator arrow direction must be inverted
bool viewInvertSortIndicator( void ) const
{ return _viewInvertSortIndicator; }
//! menu highlight mode
enum MenuHighlightMode
{
......@@ -486,6 +490,9 @@ namespace Oxygen
//! triangular expander size
ArrowSize _viewTriangularExpanderSize;
//! true if views sort order indicator arrow direction must be inverted
bool _viewInvertSortIndicator;
//! menu highlight mode
MenuHighlightMode _menuHighlightMode;
......
......@@ -2569,21 +2569,27 @@ namespace Oxygen
if( Gtk::gtk_widget_layout_is_reversed( widget ) )
{ x+=2; }
} else if(
Gtk::gtk_parent_button( widget ) &&
!Gtk::gtk_parent_tree_view( widget ) &&
!Gtk::gtk_parent_combo( widget ) )
{
} else if( ( parent = Gtk::gtk_parent_button( widget ) ) ) {
useWidgetStateEngine = false;
options &= ~( Focus|Hover );
if( d.isArrow() && GTK_IS_ARROW( widget ) )
if(!Gtk::gtk_parent_tree_view( widget ) &&
!Gtk::gtk_parent_combo( widget ) )
{
//if( arrow == GTK_ARROW_DOWN || arrow == GTK_ARROW_UP )
{ x += 1; }
useWidgetStateEngine = false;
options &= ~( Focus|Hover );
if( d.isArrow() && GTK_IS_ARROW( widget ) )
{
x += 1;
role = Palette::WindowText;
}
} else if( Gtk::gtk_button_is_header( parent ) && Style::instance().settings().viewInvertSortIndicator() ) {
arrow = (arrow == GTK_ARROW_UP) ? GTK_ARROW_DOWN:GTK_ARROW_UP;
role = Palette::WindowText;
}
} else if( GTK_IS_CALENDAR( widget ) ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment