diff --git a/.bettercodehub.yml b/.bettercodehub.yml index 67f9bc0e..ff3064b3 100644 --- a/.bettercodehub.yml +++ b/.bettercodehub.yml @@ -1,10 +1,13 @@ exclude: -- /fonts/newfont.h -- /fonts/vgafont.h -- /fonts/unicodemap.h +- /fonts/.* +- /scripts/.* +- /doc/.* - /build.sh - /ltmain.sh component_depth: 3 +test: + include: + - /test/.* languages: - cpp - script diff --git a/include/final/fdialog.h b/include/final/fdialog.h index 91bc8db4..ae825b41 100644 --- a/include/final/fdialog.h +++ b/include/final/fdialog.h @@ -186,6 +186,8 @@ class FDialog : public FWindow void drawTitleBar(); void drawBarButton(); void drawZoomButton(); + void drawRestoreSizeButton(); + void drawZoomedButton(); void drawTextBar(); void restoreOverlaidWindows(); void setCursorToFocusWidget(); diff --git a/src/fdialog.cpp b/src/fdialog.cpp index 90070580..5461afbe 100644 --- a/src/fdialog.cpp +++ b/src/fdialog.cpp @@ -1132,49 +1132,57 @@ void FDialog::drawZoomButton() setColor (wc.titlebar_button_fg, wc.titlebar_button_bg); if ( isZoomed() ) + drawRestoreSizeButton(); + else + drawZoomedButton(); +} + +//---------------------------------------------------------------------- +inline void FDialog::drawRestoreSizeButton() +{ + if ( isNewFont() ) { - if ( isNewFont() ) + print (fc::NF_rev_down_pointing_triangle1); + print (fc::NF_rev_down_pointing_triangle2); + } + else + { + if ( isMonochron() ) { - print (fc::NF_rev_down_pointing_triangle1); - print (fc::NF_rev_down_pointing_triangle2); + print ('['); + print (fc::BlackDownPointingTriangle); // ▼ + print (']'); } else { - if ( isMonochron() ) - { - print ('['); - print (fc::BlackDownPointingTriangle); // ▼ - print (']'); - } - else - { - print (' '); - print (fc::BlackDownPointingTriangle); // ▼ - print (' '); - } + print (' '); + print (fc::BlackDownPointingTriangle); // ▼ + print (' '); } } - else // is not zoomed +} + +//---------------------------------------------------------------------- +inline void FDialog::drawZoomedButton() +{ + if ( isNewFont() ) { - if ( isNewFont() ) + print (fc::NF_rev_up_pointing_triangle1); + print (fc::NF_rev_up_pointing_triangle2); + } + else + { + if ( isMonochron() ) { - print (fc::NF_rev_up_pointing_triangle1); - print (fc::NF_rev_up_pointing_triangle2); + print ('['); + print (fc::BlackUpPointingTriangle); // ▲ + print (']'); } else { - if ( isMonochron() ) - { - print ('['); - print (fc::BlackUpPointingTriangle); // ▲ - print (']'); - } - else - { - print (' '); - print (fc::BlackUpPointingTriangle); // ▲ - print (' '); - } + print (' '); + print (fc::BlackUpPointingTriangle); // ▲ + print (' '); } } }