FLTK logo

[master] f57b074 - Fix trailing whitespace and a MSVC compiler warning

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] f57b074 - Fix trailing whitespace and a MSVC compiler warning "Albrecht Schlosser" Dec 14, 2021  
 
commit f57b074378d69d19eb5a70e6335054bada06919a
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Tue Dec 14 23:55:21 2021 +0100
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Tue Dec 14 23:55:21 2021 +0100

    Fix trailing whitespace and a MSVC compiler warning
    
    No code changes

 fluid/print_panel.cxx                      |  6 +++---
 fluid/template_panel.cxx                   | 28 ++++++++++++++--------------
 src/CMakeLists.txt                         |  2 +-
 src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx |  2 +-
 test/coordinates.cxx                       |  4 ++--
 5 files changed, 21 insertions(+), 21 deletions(-)

diff --git fluid/print_panel.cxx fluid/print_panel.cxx
index 85dc223..0d688d4 100644
--- fluid/print_panel.cxx
+++ fluid/print_panel.cxx
@@ -214,14 +214,14 @@ Fl_Button *print_output_mode[4]={(Fl_Button *)0};
 
 static void cb_Save(Fl_Return_Button*, void*) {
   print_properties_panel->hide();
-  
+
   char name[1024];
   int val;
   const char *printer = (const char *)print_choice->menu()[print_choice->value()].user_data();
-  
+
   snprintf(name, sizeof(name), "%s/page_size", printer);
   fluid_prefs.set(name, print_page_size->value());
-  
+
   snprintf(name, sizeof(name), "%s/output_mode", printer);
   for (val = 0; val < 4; val ++) {
     if (print_output_mode[val]->value()) break;
diff --git fluid/template_panel.cxx fluid/template_panel.cxx
index 69bd295..0c4db0d 100644
--- fluid/template_panel.cxx
+++ fluid/template_panel.cxx
@@ -38,7 +38,7 @@ static void cb_template_panel(Fl_Double_Window*, void*) {
   Fl_Shared_Image *img = (Fl_Shared_Image *)template_preview->image();
   if (img) img->release();
   template_preview->image(0);
-  
+
   template_browser->deselect();
   template_name->value("");
   template_instance->value("");
@@ -56,38 +56,38 @@ static void cb_template_browser(Fl_Browser*, void*) {
   if (img) img->release();
   template_preview->image(0);
   template_preview->redraw();
-  
+
   int item = template_browser->value();
-  
+
   if (item <= 1) template_instance->deactivate();
   else template_instance->activate();
-  
+
   if (item < 1) {
     template_submit->deactivate();
     template_delete->deactivate();
     return;
   }
-  
+
   template_submit->activate();
-  
+
   const char *flfile = (const char *)template_browser->data(item);
   if (!flfile) {
     template_delete->deactivate();
     return;
   }
-  
+
   template_name->value(template_browser->text(item));
-  
+
   template_delete->activate();
-  
+
   char pngfile[1024], *ext;
-  
+
   strlcpy(pngfile, flfile, sizeof(pngfile));
   if ((ext = strrchr(pngfile, '.')) == NULL) return;
   strcpy(ext, ".png");
-  
+
   img = Fl_Shared_Image::get(pngfile);
-  
+
   if (img) {
     template_preview->image(img);
     template_preview->redraw();
@@ -113,7 +113,7 @@ static void cb_Cancel(Fl_Button*, void*) {
   Fl_Shared_Image *img = (Fl_Shared_Image *)template_preview->image();
   if (img) img->release();
   template_preview->image(0);
-  
+
   template_browser->deselect();
   template_name->value("");
   template_instance->value("");
@@ -126,7 +126,7 @@ static void cb_template_submit(Fl_Return_Button*, void*) {
   Fl_Shared_Image *img = (Fl_Shared_Image *)template_preview->image();
   if (img) img->release();
   template_preview->image(0);
-  
+
   template_panel->hide();
 }
 
diff --git src/CMakeLists.txt src/CMakeLists.txt
index dceb15d..e0bd1d7 100644
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -215,7 +215,7 @@ if (USE_X11)
     Fl_Native_File_Chooser_GTK.cxx
     Fl_get_key.cxx
   )
-  
+
   if (OPTION_USE_KDIALOG)
     set (DRIVER_FILES ${DRIVER_FILES} Fl_Native_File_Chooser_Kdialog.cxx)
   endif (OPTION_USE_KDIALOG)
diff --git src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
index 07985d3..cc94739 100644
--- src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
+++ src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
@@ -271,7 +271,7 @@ void Fl_GDI_Graphics_Driver::set_spot(int font, int size, int X, int Y, int W, i
     COMPOSITIONFORM cfs;
     float s = scale();
     cfs.dwStyle = CFS_POINT;
-    cfs.ptCurrentPos.x = X * s;
+    cfs.ptCurrentPos.x = int(X * s);
     cfs.ptCurrentPos.y = int(Y * s) - int(tw->labelsize() * s);
     // Attempt to have temporary text entered by input method use scaled font.
     // Does good, but still not always effective.
diff --git test/coordinates.cxx test/coordinates.cxx
index d888b7d..472bae1 100644
--- test/coordinates.cxx
+++ test/coordinates.cxx
@@ -69,7 +69,7 @@ public:
     Box* tr_box = new Box(275, 50, 200, 40, FL_BLUE,
       "Fl_Box tr(275, 50, 200, 40)\nx, y relative to main window");
     tr_group->end();
-  
+
     Fl_Group* bl_group = new Fl_Group(0, 100, 250, 100);
     bl_group->box(FL_ENGRAVED_BOX);
     Title* bl_title = new Title(10, 110, 230, 40, FL_BLACK,
@@ -77,7 +77,7 @@ public:
     Box* bl_box = new Box(25, 150, 200, 40, FL_BLACK,
       "Fl_Box bl(25, 150, 200, 40)\nx, y relative to main window");
     bl_group->end();
-  
+
     // member variable
     message_box = new Fl_Box(0, 201, 500, 30);
     message_box->align(FL_ALIGN_INSIDE | FL_ALIGN_CENTER);
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.