* BUG: Label, TextLabel, PictureBox and MovieBox now draw their plain 
  border with the foreground color, like gb.qt4 does.


git-svn-id: svn://localhost/gambas/trunk@5269 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2012-11-01 01:54:33 +00:00
parent 25ee42b34d
commit 2ca1b5e731
7 changed files with 26 additions and 1 deletions

View file

@ -1187,6 +1187,11 @@ GList* gControl::controlList()
return controls;
}
gColor gControl::getFrameColor()
{
return gDesktop::lightfgColor();
}
void gControl::drawBorder(GdkEventExpose *e)
{
GdkDrawable *win;
@ -1234,7 +1239,7 @@ void gControl::drawBorder(GdkEventExpose *e)
GdkGC *gc;
GdkGCValues values;
fill_gdk_color(&values.foreground, gDesktop::lightfgColor(), gdk_drawable_get_colormap(win));
fill_gdk_color(&values.foreground, getFrameColor(), gdk_drawable_get_colormap(win));
gc = gtk_gc_get(gdk_drawable_get_depth(win), gdk_drawable_get_colormap(win), &values, GDK_GC_FOREGROUND);
//gdk_draw_rectangle(win, use_base ? st->text_gc[GTK_STATE_NORMAL] : st->fg_gc[GTK_STATE_NORMAL], FALSE, x, y, w - 1, h - 1);

View file

@ -251,6 +251,7 @@ public:
int getFramePadding() const { return frame_padding; }
void setFramePadding(int padding);
virtual int getFrameWidth();
virtual gColor getFrameColor();
void drawBorder(GdkEventExpose *e);
void drawBackground(GdkEventExpose *e);

View file

@ -330,3 +330,8 @@ void gLabel::setWrap(bool v)
_wrap = v;
updateSize(true);
}
gColor gLabel::getFrameColor()
{
return realForeground();
}

View file

@ -56,6 +56,7 @@ public:
virtual void afterRefresh();
//"Private"
virtual gColor getFrameColor();
void updateSize(bool adjust = false, bool noresize = false);
void updateLayout();
PangoLayout *layout;

View file

@ -43,6 +43,7 @@ public:
bool loadMovie(char *buf, int len);
//"Private"
virtual gColor getFrameColor();
bool pl;
guint timeout;
GdkPixbufAnimation *animation;

View file

@ -156,6 +156,10 @@ void gMovieBox::setAlignment(int al)
gtk_misc_set_alignment(GTK_MISC(widget), gt_from_alignment(al, false), gt_from_alignment(al, true));
}
gColor gMovieBox::getFrameColor()
{
return realForeground();
}
/****************************************************************************************
@ -271,3 +275,10 @@ void gPictureBox::updateBorder()
gControl::updateBorder();
adjust();
}
gColor gPictureBox::getFrameColor()
{
return realForeground();
}

View file

@ -47,6 +47,7 @@ public:
virtual void updateBorder();
//"Private"
virtual gColor getFrameColor();
void redraw();
void adjust();
gPicture *_picture;