Commit 3a6c8349 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: Force custom toolbars not to follow RTL auto layout changes.

Some widgets can't handle RTL (timebar, ...) and
custom toolbars need special logic when reversed (next/prev...)
parent 9b0bfc02
......@@ -623,12 +623,12 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
QWidget *_parent ) :
AbstractController( _p_i, _parent )
{
RTL_UNAFFECTED_WIDGET
/* advanced Controls handling */
b_advancedVisible = b_advControls;
#ifdef DEBUG_LAYOUT
setStyleSheet( "background: red ");
#endif
setAttribute( Qt::WA_MacBrushedMetal);
QVBoxLayout *controlLayout = new QVBoxLayout( this );
controlLayout->setContentsMargins( 4, 1, 0, 0 );
......@@ -675,6 +675,7 @@ void ControlsWidget::toggleAdvanced()
AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i, QWidget *_parent ) :
AbstractController( _p_i, _parent )
{
RTL_UNAFFECTED_WIDGET
controlLayout = new QHBoxLayout( this );
controlLayout->setMargin( 0 );
controlLayout->setSpacing( 0 );
......@@ -691,6 +692,7 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i, QWidget *_parent ) :
InputControlsWidget::InputControlsWidget( intf_thread_t *_p_i, QWidget *_parent ) :
AbstractController( _p_i, _parent )
{
RTL_UNAFFECTED_WIDGET
controlLayout = new QHBoxLayout( this );
controlLayout->setMargin( 0 );
controlLayout->setSpacing( 0 );
......@@ -707,6 +709,7 @@ InputControlsWidget::InputControlsWidget( intf_thread_t *_p_i, QWidget *_parent
FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWidget *_parent )
: AbstractController( _p_i, _parent )
{
RTL_UNAFFECTED_WIDGET
i_mouse_last_x = -1;
i_mouse_last_y = -1;
b_mouse_over = false;
......
......@@ -490,6 +490,7 @@ DroppingController::DroppingController( intf_thread_t *_p_intf,
QWidget *_parent )
: AbstractController( _p_intf, _parent )
{
RTL_UNAFFECTED_WIDGET
rubberband = NULL;
b_draging = false;
setAcceptDrops( true );
......
......@@ -117,6 +117,9 @@ struct intf_sys_t
#define TOGGLEV( x ) { if( x->isVisible() ) x->hide(); \
else x->show(); }
/* for widgets which must not follow the RTL auto layout changes */
#define RTL_UNAFFECTED_WIDGET setLayoutDirection( Qt::LeftToRight );
#define getSettings() p_intf->p_sys->mainSettings
#define QT_VOLUME_DEFAULT AOUT_VOLUME_DEFAULT
......
Markdown is supported
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