FLTK logo

[master] 1408a87 - Box type focus frame graphics fixes.

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] 1408a87 - Box type focus frame graphics fixes. "Matthias Melcher" 09:32 Apr 26  
 
commit 1408a87425162f4523d3a4f6c1b9615c1c62ea0f
Author:     Matthias Melcher <github@matthiasm.com>
AuthorDate: Fri Apr 26 18:17:00 2024 +0200
Commit:     Matthias Melcher <github@matthiasm.com>
CommitDate: Fri Apr 26 18:17:04 2024 +0200

    Box type focus frame graphics fixes.

 src/fl_gtk.cxx     |  6 +++---
 src/fl_oxy.cxx     | 10 +++++-----
 src/fl_plastic.cxx |  6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git src/fl_gtk.cxx src/fl_gtk.cxx
index 495ca18..c09c24a 100644
--- src/fl_gtk.cxx
+++ src/fl_gtk.cxx
@@ -283,7 +283,7 @@ static void gtk_round_down_box(int x, int y, int w, int h, Fl_Color c) {
 
 #endif
 
-extern void fl_rounded_focus(Fl_Boxtype bt, int x, int y, int w, int h, Fl_Color fg, Fl_Color bg);
+extern void fl_round_focus(Fl_Boxtype bt, int x, int y, int w, int h, Fl_Color fg, Fl_Color bg);
 
 Fl_Boxtype fl_define_FL_GTK_UP_BOX() {
   fl_internal_boxtype(_FL_GTK_UP_BOX, gtk_up_box);
@@ -294,8 +294,8 @@ Fl_Boxtype fl_define_FL_GTK_UP_BOX() {
   fl_internal_boxtype(_FL_GTK_THIN_DOWN_BOX, gtk_thin_down_box);
   fl_internal_boxtype(_FL_GTK_THIN_UP_FRAME, gtk_thin_up_frame);
   fl_internal_boxtype(_FL_GTK_THIN_DOWN_FRAME, gtk_thin_down_frame);
-  fl_internal_boxtype(_FL_GTK_ROUND_UP_BOX, gtk_round_up_box, fl_rounded_focus);
-  fl_internal_boxtype(_FL_GTK_ROUND_DOWN_BOX, gtk_round_down_box, fl_rounded_focus);
+  fl_internal_boxtype(_FL_GTK_ROUND_UP_BOX, gtk_round_up_box, fl_round_focus);
+  fl_internal_boxtype(_FL_GTK_ROUND_DOWN_BOX, gtk_round_down_box, fl_round_focus);
 
   return _FL_GTK_UP_BOX;
 }
diff --git src/fl_oxy.cxx src/fl_oxy.cxx
index 763f501..4e12f9b 100644
--- src/fl_oxy.cxx
+++ src/fl_oxy.cxx
@@ -213,14 +213,14 @@ static void _oxy_rounded_box_(int x, int y, int w, int h, Fl_Color bg) {
   fl_color(bg);
   if (w > h) {
     fl_pie(x, y, h, h, 90.0, 270.0);          // right half of circle
-    fl_rectf(x + h / 2, y, w - h, h);         // rectangle between left and right half-circle
+    fl_rectf(x + h / 2, y, w - h + 1, h);     // rectangle between left and right half-circle
     fl_pie(x + w - h, y, h, h, 0.0, 90.0);    // top-left quarter of circle
     fl_pie(x + w - h, y, h, h, 270.0, 360.0); // bottom-left quarter of circle
   } else if (w == h) {
     fl_pie(x, y, w, w, 0.0, 360.0);
   } else {
     fl_pie(x, y, w, w, 0.0, 180.0);           // top half of circle
-    fl_rectf(x, y + w / 2, w, h - w);         // rectangle between top and bottom half-circle
+    fl_rectf(x, y + w / 2, w, h - w + 1);     // rectangle between top and bottom half-circle
     fl_pie(x, y + h - w, w, w, 180.0, 360.0); // bottom half of circle
   }
 }
@@ -504,7 +504,7 @@ void round_down_box(int x, int y, int w, int h, Fl_Color col) {
 }
 
 
-extern void fl_rounded_focus(Fl_Boxtype bt, int x, int y, int w, int h, Fl_Color fg, Fl_Color bg);
+extern void fl_round_focus(Fl_Boxtype bt, int x, int y, int w, int h, Fl_Color fg, Fl_Color bg);
 extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*, Fl_Box_Draw_Focus_F* =NULL);
 
 Fl_Boxtype fl_define_FL_OXY_UP_BOX() {
@@ -517,8 +517,8 @@ Fl_Boxtype fl_define_FL_OXY_UP_BOX() {
   fl_internal_boxtype(_FL_OXY_THIN_DOWN_BOX, thin_down_box);
   fl_internal_boxtype(_FL_OXY_THIN_UP_FRAME, thin_up_frame);
   fl_internal_boxtype(_FL_OXY_THIN_DOWN_FRAME, thin_down_frame);
-  fl_internal_boxtype(_FL_OXY_ROUND_UP_BOX, round_up_box, fl_rounded_focus);
-  fl_internal_boxtype(_FL_OXY_ROUND_DOWN_BOX, round_down_box, fl_rounded_focus);
+  fl_internal_boxtype(_FL_OXY_ROUND_UP_BOX, round_up_box, fl_round_focus);
+  fl_internal_boxtype(_FL_OXY_ROUND_DOWN_BOX, round_down_box, fl_round_focus);
   fl_internal_boxtype(_FL_OXY_BUTTON_UP_BOX, button_up_box);
   fl_internal_boxtype(_FL_OXY_BUTTON_DOWN_BOX, button_down_box);
 
diff --git src/fl_plastic.cxx src/fl_plastic.cxx
index bc89783..16c565c 100644
--- src/fl_plastic.cxx
+++ src/fl_plastic.cxx
@@ -348,7 +348,7 @@ static void down_round(int x, int y, int w, int h, Fl_Color c) {
 }
 
 
-extern void fl_rounded_focus(Fl_Boxtype bt, int x, int y, int w, int h, Fl_Color fg, Fl_Color bg);
+extern void fl_round_focus(Fl_Boxtype bt, int x, int y, int w, int h, Fl_Color fg, Fl_Color bg);
 extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*, Fl_Box_Draw_Focus_F* =NULL);
 
 Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX() {
@@ -358,8 +358,8 @@ Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX() {
   fl_internal_boxtype(_FL_PLASTIC_DOWN_FRAME, down_frame);
   fl_internal_boxtype(_FL_PLASTIC_THIN_UP_BOX, thin_up_box);
   fl_internal_boxtype(_FL_PLASTIC_THIN_DOWN_BOX, down_box);
-  fl_internal_boxtype(_FL_PLASTIC_ROUND_UP_BOX, up_round, fl_rounded_focus);
-  fl_internal_boxtype(_FL_PLASTIC_ROUND_DOWN_BOX, down_round, fl_rounded_focus);
+  fl_internal_boxtype(_FL_PLASTIC_ROUND_UP_BOX, up_round, fl_round_focus);
+  fl_internal_boxtype(_FL_PLASTIC_ROUND_DOWN_BOX, down_round, fl_round_focus);
 
   return _FL_PLASTIC_UP_BOX;
 }
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'.