X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cca410b336cd5628a944ede9e9944fdbb04552d4..952a3bd46dc50f95c462606fac8214573022f612:/src/gtk/minifram.cpp?ds=sidebyside diff --git a/src/gtk/minifram.cpp b/src/gtk/minifram.cpp index ae4a543418..cfbd40bae0 100644 --- a/src/gtk/minifram.cpp +++ b/src/gtk/minifram.cpp @@ -96,19 +96,22 @@ static gboolean gtk_window_own_expose_callback(GtkWidget* widget, GdkEventExpose (style & wxTINY_CAPTION_VERT))) { dc.SetFont( *wxSMALL_FONT ); - int height = dc.GetCharHeight(); wxBrush brush( LightContrastColour( wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT) ) ); dc.SetBrush( brush ); dc.SetPen( *wxTRANSPARENT_PEN ); - dc.DrawRectangle( 3, 3, win->m_width - 7, height ); + dc.DrawRectangle( win->m_miniEdge-1, + win->m_miniEdge-1, + win->m_width - (2*(win->m_miniEdge-1)), + 15 ); dc.SetTextForeground( *wxWHITE ); - dc.DrawText( win->GetTitle(), 6, 3 ); + dc.DrawText( win->GetTitle(), 6, 4 ); if (style & wxCLOSE_BOX) - dc.DrawBitmap( win->m_closeButton, win->m_width-19, 2, true ); + dc.DrawBitmap( win->m_closeButton, win->m_width-18, 3, true ); } + return false; } } @@ -162,12 +165,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton } } - wxClientDC dc(win); - dc.SetFont( *wxSMALL_FONT ); - int height = dc.GetCharHeight() + 1; - - - if (y > height) return TRUE; + if (y > win->m_miniEdge-1 + 15) return TRUE; gdk_window_raise( win->m_widget->window );