Opened 8 years ago

Closed 7 years ago

#11690 closed defect (fixed)

wxPanel with wxBORDER_SUNKEN style is not drawn correctly

Reported by: EzPresso Owned by:
Priority: normal Milestone: 3.0.0
Component: wxGTK Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: no

Description

Hi there!

I tested this only with wxGTK from SVN!

I've got two wxPanels with a wxBORDER_SUNKEN style within horizontal sizer. The top and left borders of left panel are not drawn correctly. I tried this even with minimal sample:

...
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
public:
    // ctor(s)
    MyFrame(const wxString& title);

    // event handlers (these functions should _not_ be virtual)
    void OnQuit(wxCommandEvent& event);
    void OnAbout(wxCommandEvent& event);

private:
    wxButton *button1;
    wxPanel* m_panel1;
    wxPanel* m_panel2;
	
    // any class wishing to process wxWidgets events must use this macro
    DECLARE_EVENT_TABLE()
};
...
...
#if wxUSE_STATUSBAR
    // create a status bar just for fun (by default with 1 pane only)
    CreateStatusBar(2);
    SetStatusText("Welcome to wxWidgets!");
#endif // wxUSE_STATUSBAR

	// Test
    m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 180,180 ), wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
    m_panel1->SetBackgroundColour( wxColour(200,200,0) );

    m_panel2 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 180,180 ), wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
    m_panel2->SetBackgroundColour( wxColour(0,200,200) );

    wxBoxSizer* bSizer1 = new wxBoxSizer( wxHORIZONTAL );
    bSizer1->Add( m_panel1, 0, wxALL, 5 );
    bSizer1->Add( m_panel2, 0, wxALL, 5 );

    this->SetSizer( bSizer1 );
    this->Layout();
...

Thanks!
Ilya

Attachments (3)

wxminimal-snapshot.png download (8.2 KB) - added by EzPresso 8 years ago.
Screenshot of minimal app
wxSVN-snapshot2.png download (9.6 KB) - added by EzPresso 8 years ago.
Another one example of this bug
wxminimal-63331.png download (4.3 KB) - added by EzPresso 8 years ago.
GDK_NATIVE_WINDOWS=1 ./minimal

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by EzPresso

Screenshot of minimal app

comment:1 Changed 8 years ago by robind

  • Status changed from new to confirmed

I've seen this too so I'll mark this as confirmed. I've also noticed that if the window is resized then the incorrectly drawn portion of the border can shift size. For example try putting panels with sunken borders in a splitter window.

comment:2 follow-up: Changed 8 years ago by pcor

I can't reproduce this. What GTK+ version, desktop environment, and theme are you using?

comment:3 in reply to: ↑ 2 Changed 8 years ago by EzPresso

Replying to pcor:

I can't reproduce this. What GTK+ version, desktop environment, and theme are you using?

Kubuntu 9.10, KDE 4.3.2, GTK+ 2.18.3. wxWidgets from SVN, revision 63355.

Changed 8 years ago by EzPresso

Another one example of this bug

comment:4 Changed 8 years ago by pcor

Earlier versions of GTK+ 2.18 have some known drawing glitches due to the new "client side windows" implementation. Does the problem still occur if you set the environment variable GDK_NATIVE_WINDOWS? For example,

GDK_NATIVE_WINDOWS=1 ./minimal

comment:5 Changed 8 years ago by EzPresso

Tried it on another machine issuing

GDK_NATIVE_WINDOWS=1 ./minimal

The result is the same as before. Nothing changed!

Changed 8 years ago by EzPresso

GDK_NATIVE_WINDOWS=1 ./minimal

comment:6 Changed 7 years ago by pcor

Might be fixed by r64725, please re-test.

comment:7 Changed 7 years ago by pcor

  • Resolution set to fixed
  • Status changed from confirmed to closed

Fixed in r67377.

Note: See TracTickets for help on using tickets.