Scrolling fixes for RTL layout with GTK3
Avoid some positioning hacks, they are not needed with GTK3
This commit is contained in:
@@ -1042,7 +1042,7 @@ void wxListHeaderWindow::AdjustDC(wxDC& dc)
|
||||
dc.GetDeviceOrigin( &org_x, &org_y );
|
||||
|
||||
// account for the horz scrollbar offset
|
||||
#ifdef __WXGTK__
|
||||
#if defined(__WXGTK__) && !defined(__WXGTK3__)
|
||||
if (GetLayoutDirection() == wxLayout_RightToLeft)
|
||||
{
|
||||
// Maybe we just have to check for m_signX
|
||||
|
@@ -655,7 +655,7 @@ int wxScrollHelperBase::CalcScrollInc(wxScrollWinEvent& event)
|
||||
void wxScrollHelperBase::DoPrepareDC(wxDC& dc)
|
||||
{
|
||||
wxPoint pt = dc.GetDeviceOrigin();
|
||||
#ifdef __WXGTK__
|
||||
#if defined(__WXGTK__) && !defined(__WXGTK3__)
|
||||
// It may actually be correct to always query
|
||||
// the m_sign from the DC here, but I leave the
|
||||
// #ifdef GTK for now.
|
||||
|
@@ -476,8 +476,10 @@ static void scroll_adjust(GtkWidget* widget, void* data)
|
||||
void wxPizza::scroll(int dx, int dy)
|
||||
{
|
||||
GtkWidget* widget = GTK_WIDGET(this);
|
||||
#ifndef __WXGTK3__
|
||||
if (gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL)
|
||||
dx = -dx;
|
||||
#endif
|
||||
m_scroll_x -= dx;
|
||||
m_scroll_y -= dy;
|
||||
GdkWindow* window = gtk_widget_get_window(widget);
|
||||
|
Reference in New Issue
Block a user