Fix whitespace and minor formatting issues

This commit is contained in:
Albrecht Schlosser 2020-11-17 16:11:03 +01:00
parent 2931c29689
commit 5cb72ef065
7 changed files with 20 additions and 25 deletions

View File

@ -68,7 +68,7 @@ class Fl_PostScript_Graphics_Driver;
<tr><td></td><td>U+2018</td><td>quoteleft</td><td>/</td><td>U+2044</td><td>fraction</td><td></td><td>U+FB02</td><td>fl</td></tr>
<tr><td></td><td>U+2019</td><td>quoteright</td><td></td><td>U+20AC</td><td>Euro</td><td></td><td>U+F8FF</td><td>apple (Mac OS only)</td></tr>
</table>
*/
class FL_EXPORT Fl_PostScript_File_Device : public Fl_Paged_Device {
protected:

View File

@ -206,7 +206,7 @@ void StyleParse::buffer_keyword() {
char *key = keyword;
char *kend = key + sizeof(keyword) - 1; // end of buffer
for ( const char *s=tbuff;
(islower(*s) || *s=='_') && (key < kend);
(islower(*s) || *s=='_') && (key < kend);
*key++ = *s++ ) { }
*key = 0; // terminate
}

View File

@ -764,7 +764,7 @@ Default is on.} xywh {245 366 100 25} down_box BORDER_BOX
}
}
}
Fl_Group {} {
label {Scaling Factor Options} open
xywh {10 421 380 66} box GTK_DOWN_BOX labelfont 2 align 21
@ -797,7 +797,7 @@ Default is on.} xywh {245 442 100 25} down_box BORDER_BOX
}
}
}
Fl_Choice wUserOrSystem {
callback {refreshUI();} open
tooltip {Change settings for the current user, or default values for all users of this computer. Individual users can override system options, if they set their options to specific values (not 'default').} xywh {10 496 141 25} down_box BORDER_BOX

View File

@ -188,8 +188,7 @@ public:
w -= Fl::box_dw(o->box());
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
Fl::box_dh(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}
@ -236,8 +235,7 @@ public:
w -= Fl::box_dw(o->box()) - fl_height();
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
Fl::box_dh(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}
@ -311,8 +309,7 @@ public:
w -= Fl::box_dw(o->box()) + fl_height();
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
Fl::box_dh(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}
@ -403,7 +400,8 @@ public:
virtual const char *alt_type_name() {return "fltk::Spinner";}
int is_spinner() const { return 1; }
Fl_Widget *widget(int x,int y,int w,int h) {
return new Fl_Spinner(x,y,w,h,"spinner:");}
return new Fl_Spinner(x,y,w,h,"spinner:");
}
Fl_Widget_Type *_make() {return new Fl_Spinner_Type();}
};
static Fl_Spinner_Type Fl_Spinner_type;
@ -532,8 +530,7 @@ public:
w -= Fl::box_dw(o->box());
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
Fl::box_dh(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}
@ -574,8 +571,7 @@ public:
w -= Fl::box_dw(o->box());
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
Fl::box_dh(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}
@ -654,8 +650,7 @@ public:
w -= Fl::box_dw(o->box());
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
Fl::box_dh(o->box());
h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}

View File

@ -4366,7 +4366,7 @@ void Fl_Cocoa_Window_Driver::draw_titlebar_to_context(CGContextRef gc, int w, in
{
FLWindow *nswin = fl_xid(pWindow);
[nswin makeMainWindow];
[NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:NO];
[NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:NO];
CGImageRef img;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
if (fl_mac_os_version >= 100600) { // verified OK from 10.6

View File

@ -1622,7 +1622,7 @@ void Fl_PostScript_Graphics_Driver::line_style(int style, int width, char* dashe
if(dashes){
if(dashes != linedash_)
strcpy(linedash_,dashes);
} else
linedash_[0]=0;
char width0 = 0;
@ -1631,10 +1631,10 @@ void Fl_PostScript_Graphics_Driver::line_style(int style, int width, char* dashe
width0=1;
}
cairo_set_line_width(cairo_, width);
if(!style && (!dashes || !(*dashes)) && width0) //system lines
style = FL_CAP_SQUARE;
int cap = (style &0xf00);
cairo_line_cap_t c_cap;
if (cap == FL_CAP_SQUARE) c_cap = CAIRO_LINE_CAP_SQUARE;
@ -1642,7 +1642,7 @@ void Fl_PostScript_Graphics_Driver::line_style(int style, int width, char* dashe
else if (cap == FL_CAP_ROUND) c_cap = CAIRO_LINE_CAP_ROUND;
else c_cap = CAIRO_LINE_CAP_BUTT;
cairo_set_line_cap(cairo_, c_cap);
int join = (style & 0xf000);
cairo_line_join_t c_join;
if (join == FL_JOIN_MITER) c_join = CAIRO_LINE_JOIN_MITER;
@ -1650,7 +1650,7 @@ void Fl_PostScript_Graphics_Driver::line_style(int style, int width, char* dashe
else if (join == FL_JOIN_BEVEL) c_join = CAIRO_LINE_JOIN_BEVEL;
else c_join = CAIRO_LINE_JOIN_MITER;
cairo_set_line_join(cairo_, c_join);
double *ddashes = NULL;
int l = 0;
if (dashes && *dashes){

View File

@ -504,7 +504,7 @@ Fl_WinAPI_Screen_Driver::read_win_rectangle(
Fl_RGB_Image *Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled(int X, int Y, int w, int h, Fl_Window *win)
{
// Depth of image is always 3 here
// Grab all of the pixels in the image...
// Assure that we are not trying to read non-existing data. If it is so, the
@ -528,7 +528,7 @@ Fl_RGB_Image *Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled(int X, int Y,
}
if (h < 1 || w < 1) return 0; // nothing to copy
// Allocate and initialize the image data array
size_t arraySize = ((size_t)w * h) * 3;
uchar *p = new uchar[arraySize];