paragui-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-dev] bugs and fixes


From: Martin Bickel
Subject: [paragui-dev] bugs and fixes
Date: Sat, 25 Jun 2005 16:57:00 +0200

Hi,

here comes another bunch of fixes and improvements for the development
branch of Paragui:

PGApplication:: SetBackground didn't update the screen. It now does. It
also allows for freeing surfaces itself.

The sliders in ScrollBars now have a proportional size. Since the
PageSize is becoming important now, PG_MultilineEdit had to be updated
to set it. I expect that some other classes also need to set the
pagesize, but I haven't checked all of them yet.

PGWidget already had properties for the inner border color for thicker
borders, but they couldn't be set using a theme. I've changed that, the
entries are called bordercolor0i / bordercolor1i

PGScrollWidget initialized the scroll area with a width and height of
0. This caused scrollbars to appear as soon as the first widget was
added. The area size is now correctly initialized so that the
scrollbars only appear when necessary.



And I've found a bug in the redrawing code of paragui. But since that
area has lots of dependencies and I don't see an obvious way to fix it,
I'm a bit reluctant to start hacking away there. So I'll just provide a
test case and hope that someone else (say, Alex ;-) ), finds an easy
way to fix it :-)
The attached file windowtest2.cpp shows the bug. There's a window with
2 child widgets: a label "Hello World" and a semitransparent button
called "button". When the window is drawn the label is clearly shown
beneath the button. 
But when the button issues an Update() call (for example when the mouse
hovers over the button), the button calls RestoreBackground, but that
call does only draw the window, not its label child. So the label
disappears.

When the window is moved and the Window itself starts the update, the
label appears again.

Regards,
Martin

Attachment: patch
Description: Binary data

#include "pgapplication.h"
#include "pgthemewidget.h"
#include "pgwindow.h"
#include "pgbutton.h"

int main(int argc,char *argv[])
{
        PG_Application app;
        app.SetEmergencyQuit(true);
        app.LoadTheme("simple");
        app.InitScreen(800,600,0,SDL_SWSURFACE);

        PG_Window* window = new PG_Window( NULL,PG_Rect(200,200,350,250));
        new PG_Label( window, PG_Rect(20,100,100,30), "Hello World" );
        PG_Button* button = new PG_Button( window, PG_Rect(10,50,300,100), 
"Button" );
        button->SetTransparency(100,100,100);
        window->Show();
        
        app.Run();
}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]