Updated the default label and text colors of all widgets to use
FL_FOREGROUND_COLOR instead of FL_BLACK (STR #1052) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4609 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
4baeeefabe
commit
067d1d8a61
3
CHANGES
3
CHANGES
@ -3,6 +3,9 @@ CHANGES IN FLTK 1.1.7
|
||||
- Documentation fixes (STR #571, STR #648, STR #692, STR
|
||||
#730, STR #744, STR #745, STR #931, STR #942, STR #960,
|
||||
STR #969)
|
||||
- Updated the default label and text colors of all widgets
|
||||
to use FL_FOREGROUND_COLOR instead of FL_BLACK (STR
|
||||
#1052)
|
||||
- Fl::set_fonts() now works with Xft (STR #1012)
|
||||
- Fl_Value_Input now uses the screen-absolute position
|
||||
instead of the window-relative position when dragging
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
Fl_Text_Display::Style_Table_Entry CodeEditor::
|
||||
styletable[] = { // Style table
|
||||
{ FL_BLACK, FL_COURIER, 11 }, // A - Plain
|
||||
{ FL_FOREGROUND_COLOR, FL_COURIER, 11 }, // A - Plain
|
||||
{ FL_DARK_GREEN, FL_COURIER_ITALIC, 11 }, // B - Line comments
|
||||
{ FL_DARK_GREEN, FL_COURIER_ITALIC, 11 }, // C - Block comments
|
||||
{ FL_BLUE, FL_COURIER, 11 }, // D - Strings
|
||||
|
@ -524,7 +524,7 @@ Fl_Menu_Bar_Type Fl_Menu_Bar_type;
|
||||
void Shortcut_Button::draw() {
|
||||
if (value()) draw_box(FL_DOWN_BOX, (Fl_Color)9);
|
||||
else draw_box(FL_UP_BOX, FL_WHITE);
|
||||
fl_font(FL_HELVETICA,14); fl_color(FL_BLACK);
|
||||
fl_font(FL_HELVETICA,14); fl_color(FL_FOREGROUND_COLOR);
|
||||
fl_draw(fl_shortcut_label(svalue),x()+6,y(),w(),h(),FL_ALIGN_LEFT);
|
||||
}
|
||||
|
||||
|
@ -248,8 +248,8 @@ extern const char* subclassname(Fl_Type*);
|
||||
void Widget_Browser::item_draw(void *v, int X, int Y, int, int) const {
|
||||
Fl_Type *l = (Fl_Type *)v;
|
||||
X += 3 + 18 + l->level * 12;
|
||||
if (l->new_selected) fl_color(fl_contrast(FL_BLACK,FL_SELECTION_COLOR));
|
||||
else fl_color(FL_BLACK);
|
||||
if (l->new_selected) fl_color(fl_contrast(FL_FOREGROUND_COLOR,FL_SELECTION_COLOR));
|
||||
else fl_color(FL_FOREGROUND_COLOR);
|
||||
Fl_Pixmap *pm = pixmap[l->pixmapID()];
|
||||
if (pm) pm->draw(X-18, Y);
|
||||
if (l->is_public() == 0) lock_pixmap.draw(X - 17, Y);
|
||||
|
@ -161,7 +161,7 @@ Fl_Adjuster::Fl_Adjuster(int X, int Y, int W, int H, const char* l)
|
||||
: Fl_Valuator(X, Y, W, H, l) {
|
||||
box(FL_UP_BOX);
|
||||
step(1, 10000);
|
||||
selection_color(FL_BLACK);
|
||||
selection_color(FL_SELECTION_COLOR);
|
||||
drag = 0;
|
||||
soft_ = 1;
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ Fl_Widget(X,Y,W,H,l) {
|
||||
min = max = 0;
|
||||
textfont_ = FL_HELVETICA;
|
||||
textsize_ = 10;
|
||||
textcolor_ = FL_BLACK;
|
||||
textcolor_ = FL_FOREGROUND_COLOR;
|
||||
entries = (FL_CHART_ENTRY *)calloc(sizeof(FL_CHART_ENTRY), FL_CHART_MAX + 1);
|
||||
}
|
||||
|
||||
|
@ -36,5 +36,5 @@ Fl_Check_Button::Fl_Check_Button(int X, int Y, int W, int H, const char *l)
|
||||
: Fl_Light_Button(X, Y, W, H, l) {
|
||||
box(FL_NO_BOX);
|
||||
down_box(FL_DOWN_BOX);
|
||||
selection_color(FL_BLACK);
|
||||
selection_color(FL_SELECTION_COLOR);
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ int Fl_Menu_Item::measure(int* hp, const Fl_Menu_* m) const {
|
||||
l.type = labeltype_;
|
||||
l.font = labelsize_ || labelfont_ ? labelfont_ : uchar(m ? m->textfont() : FL_HELVETICA);
|
||||
l.size = labelsize_ ? labelsize_ : m ? m->textsize() : (uchar)FL_NORMAL_SIZE;
|
||||
l.color = FL_BLACK; // this makes no difference?
|
||||
l.color = FL_FOREGROUND_COLOR; // this makes no difference?
|
||||
fl_draw_shortcut = 1;
|
||||
int w = 0; int h = 0;
|
||||
l.measure(w, hp ? *hp : h);
|
||||
@ -140,7 +140,7 @@ void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m,
|
||||
l.type = labeltype_;
|
||||
l.font = labelsize_ || labelfont_ ? labelfont_ : uchar(m ? m->textfont() : FL_HELVETICA);
|
||||
l.size = labelsize_ ? labelsize_ : m ? m->textsize() : (uchar)FL_NORMAL_SIZE;
|
||||
l.color = labelcolor_ ? labelcolor_ : m ? m->textcolor() : int(FL_BLACK);
|
||||
l.color = labelcolor_ ? labelcolor_ : m ? m->textcolor() : int(FL_FOREGROUND_COLOR);
|
||||
if (!active()) l.color = fl_inactive((Fl_Color)l.color);
|
||||
Fl_Color color = m ? m->color() : FL_GRAY;
|
||||
if (selected) {
|
||||
|
@ -176,7 +176,7 @@ Fl_Menu_::Fl_Menu_(int X,int Y,int W,int H,const char* l)
|
||||
selection_color(FL_SELECTION_COLOR);
|
||||
textfont(FL_HELVETICA);
|
||||
textsize((uchar)FL_NORMAL_SIZE);
|
||||
textcolor(FL_BLACK);
|
||||
textcolor(FL_FOREGROUND_COLOR);
|
||||
down_box(FL_NO_BOX);
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ Fl_Value_Output::Fl_Value_Output(int X, int Y, int W, int H,const char *l)
|
||||
align(FL_ALIGN_LEFT);
|
||||
textfont_ = FL_HELVETICA;
|
||||
textsize_ = (uchar)FL_NORMAL_SIZE;
|
||||
textcolor_ = FL_BLACK;
|
||||
textcolor_ = FL_FOREGROUND_COLOR;
|
||||
soft_ = 0;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ Fl_Value_Slider::Fl_Value_Slider(int X, int Y, int W, int H, const char*l)
|
||||
step(1,100);
|
||||
textfont_ = FL_HELVETICA;
|
||||
textsize_ = 10;
|
||||
textcolor_ = FL_BLACK;
|
||||
textcolor_ = FL_FOREGROUND_COLOR;
|
||||
}
|
||||
|
||||
void Fl_Value_Slider::draw() {
|
||||
|
@ -88,7 +88,7 @@ Fl_Widget::Fl_Widget(int X, int Y, int W, int H, const char* L) {
|
||||
label_.type = FL_NORMAL_LABEL;
|
||||
label_.font = FL_HELVETICA;
|
||||
label_.size = (uchar)FL_NORMAL_SIZE;
|
||||
label_.color = FL_BLACK;
|
||||
label_.color = FL_FOREGROUND_COLOR;
|
||||
tooltip_ = 0;
|
||||
callback_ = default_callback;
|
||||
user_data_ = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user