From 5cb72ef065f53d8f8759a6b6cccd35a2f367f290 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 17 Nov 2020 16:11:03 +0100 Subject: Fix whitespace and minor formatting issues --- FL/Fl_PostScript.H | 2 +- fluid/StyleParse.cxx | 2 +- fluid/alignment_panel.fl | 4 ++-- fluid/factory.cxx | 21 ++++++++------------- src/Fl_cocoa.mm | 2 +- src/drivers/PostScript/Fl_PostScript.cxx | 10 +++++----- src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx | 4 ++-- 7 files changed, 20 insertions(+), 25 deletions(-) diff --git a/FL/Fl_PostScript.H b/FL/Fl_PostScript.H index 7b2b3ac8e..fbef51251 100644 --- a/FL/Fl_PostScript.H +++ b/FL/Fl_PostScript.H @@ -68,7 +68,7 @@ class Fl_PostScript_Graphics_Driver; ‘U+2018quoteleft/U+2044fractionflU+FB02fl ’U+2019quoteright€U+20ACEuroU+F8FFapple (Mac OS only) - + */ class FL_EXPORT Fl_PostScript_File_Device : public Fl_Paged_Device { protected: diff --git a/fluid/StyleParse.cxx b/fluid/StyleParse.cxx index abbb33fcf..5d0dd5e5d 100644 --- a/fluid/StyleParse.cxx +++ b/fluid/StyleParse.cxx @@ -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 } diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl index 588b27c9a..cb9b1112f 100644 --- a/fluid/alignment_panel.fl +++ b/fluid/alignment_panel.fl @@ -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 diff --git a/fluid/factory.cxx b/fluid/factory.cxx index 23f903498..72ad7737c 100644 --- a/fluid/factory.cxx +++ b/fluid/factory.cxx @@ -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; } diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index def25c8bf..800041c8a 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -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 diff --git a/src/drivers/PostScript/Fl_PostScript.cxx b/src/drivers/PostScript/Fl_PostScript.cxx index 755185ec8..15b66563a 100644 --- a/src/drivers/PostScript/Fl_PostScript.cxx +++ b/src/drivers/PostScript/Fl_PostScript.cxx @@ -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){ diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx index 873e76a4c..440bf2762 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx @@ -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]; -- cgit v1.2.3