mirror of
https://github.com/fltk/fltk.git
synced 2026-05-30 04:55:29 +08:00
Removed useless tests of whether unsigned Fl_Color is < 0
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9727 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -49,7 +49,7 @@ ColorMenu::ColorMenu(Fl_Color oldcol) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ColorMenu::drawbox(Fl_Color c) {
|
void ColorMenu::drawbox(Fl_Color c) {
|
||||||
if (c < 0 || c > 255) return;
|
if (c > 255) return;
|
||||||
int X = (c%8)*BOXSIZE+BORDER;
|
int X = (c%8)*BOXSIZE+BORDER;
|
||||||
int Y = (c/8)*BOXSIZE+BORDER;
|
int Y = (c/8)*BOXSIZE+BORDER;
|
||||||
#if BORDER_WIDTH < 3
|
#if BORDER_WIDTH < 3
|
||||||
@@ -129,7 +129,7 @@ extern char fl_override_redirect; // hack for menus
|
|||||||
#pragma optimize("a",off) // needed to get the done check to work
|
#pragma optimize("a",off) // needed to get the done check to work
|
||||||
#endif
|
#endif
|
||||||
Fl_Color ColorMenu::run() {
|
Fl_Color ColorMenu::run() {
|
||||||
if (which < 0 || which > 255) {
|
if (which > 255) {
|
||||||
position(Fl::event_x_root()-w()/2, Fl::event_y_root()-y()/2);
|
position(Fl::event_x_root()-w()/2, Fl::event_y_root()-y()/2);
|
||||||
} else {
|
} else {
|
||||||
position(Fl::event_x_root()-(initial%8)*BOXSIZE-BOXSIZE/2-BORDER,
|
position(Fl::event_x_root()-(initial%8)*BOXSIZE-BOXSIZE/2-BORDER,
|
||||||
|
|||||||
Reference in New Issue
Block a user