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 );
|
dc.GetDeviceOrigin( &org_x, &org_y );
|
||||||
|
|
||||||
// account for the horz scrollbar offset
|
// account for the horz scrollbar offset
|
||||||
#ifdef __WXGTK__
|
#if defined(__WXGTK__) && !defined(__WXGTK3__)
|
||||||
if (GetLayoutDirection() == wxLayout_RightToLeft)
|
if (GetLayoutDirection() == wxLayout_RightToLeft)
|
||||||
{
|
{
|
||||||
// Maybe we just have to check for m_signX
|
// Maybe we just have to check for m_signX
|
||||||
|
@@ -655,7 +655,7 @@ int wxScrollHelperBase::CalcScrollInc(wxScrollWinEvent& event)
|
|||||||
void wxScrollHelperBase::DoPrepareDC(wxDC& dc)
|
void wxScrollHelperBase::DoPrepareDC(wxDC& dc)
|
||||||
{
|
{
|
||||||
wxPoint pt = dc.GetDeviceOrigin();
|
wxPoint pt = dc.GetDeviceOrigin();
|
||||||
#ifdef __WXGTK__
|
#if defined(__WXGTK__) && !defined(__WXGTK3__)
|
||||||
// It may actually be correct to always query
|
// It may actually be correct to always query
|
||||||
// the m_sign from the DC here, but I leave the
|
// the m_sign from the DC here, but I leave the
|
||||||
// #ifdef GTK for now.
|
// #ifdef GTK for now.
|
||||||
|
@@ -476,8 +476,10 @@ static void scroll_adjust(GtkWidget* widget, void* data)
|
|||||||
void wxPizza::scroll(int dx, int dy)
|
void wxPizza::scroll(int dx, int dy)
|
||||||
{
|
{
|
||||||
GtkWidget* widget = GTK_WIDGET(this);
|
GtkWidget* widget = GTK_WIDGET(this);
|
||||||
|
#ifndef __WXGTK3__
|
||||||
if (gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL)
|
if (gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL)
|
||||||
dx = -dx;
|
dx = -dx;
|
||||||
|
#endif
|
||||||
m_scroll_x -= dx;
|
m_scroll_x -= dx;
|
||||||
m_scroll_y -= dy;
|
m_scroll_y -= dy;
|
||||||
GdkWindow* window = gtk_widget_get_window(widget);
|
GdkWindow* window = gtk_widget_get_window(widget);
|
||||||
|
Reference in New Issue
Block a user