Commit Graph

11249 Commits

Author SHA1 Message Date
ManoloFLTK fa7fe31372 Document GUI scaling shortcuts - cont'd 2024-02-27 21:10:04 +01:00
ManoloFLTK 0359ecd53b Document how GUI scaling shortcuts FL_COMMAND/+/-/0/ work
Document also how to deactivate them.
2024-02-27 19:14:05 +01:00
ManoloFLTK eb3977ac43 Fix regression introduced at 41740ca for non resizable windows 2024-02-27 18:52:25 +01:00
ManoloFLTK fc46e771cd Improve prioritization of event handlers added at open display time 2024-02-27 16:20:25 +01:00
ManoloFLTK 746cbf861a Minor optimization of macOS automatic Window menu 2024-02-27 13:46:41 +01:00
ManoloFLTK 4863f959c8 macOS: Window menu of system menubar follows changes in active window 2024-02-27 09:13:41 +01:00
ManoloFLTK f35ae7122d Stop GUI scaling when window is maximized or full screen (#919)
Don't rescale when any top window on same screen as focus window is fullscreen or maximized
2024-02-27 08:46:40 +01:00
ManoloFLTK 3f794d3abe Allow FL_COMMAND+'+' as macOS system menu shortcuts - cont'd 2024-02-26 17:48:18 +01:00
ManoloFLTK 0818d4ec5b Fix: Fl_Window::fullscreen() does not work correctly on Mac (#920) 2024-02-26 12:15:47 +01:00
ManoloFLTK 41740caa2e Don't rescale when top window is fullscreen or maximized (#919) 2024-02-26 11:00:42 +01:00
ManoloFLTK 2ea5291821 Allow FL_COMMAND+'+' and FL_CTRL+'0' as menu shortcuts 2024-02-26 10:46:28 +01:00
Albrecht Schlosser 77c726c79c CMake/macOS/X11: fix "FINK" search directories
note: use only if found.

Todo: check if we can get rid of explicit directory names like /opt/sw,
  /sw, /opt/X11, ...
2024-02-24 19:20:22 +01:00
Albrecht Schlosser 37c8c051ba Remove reference to automake which is not required 2024-02-24 18:10:35 +01:00
Albrecht Schlosser f288aea10a Fix Fl_Group::resize() for groups w/o resizable() (#917)
Improve code comments to clarify which cases are handled in a code
block and why this is done. Subwindows have some special needs.
2024-02-23 19:21:26 +01:00
Albrecht Schlosser a6dc84ac83 Fix CMake code that should only be evaluated on macOS
Too much simplified code when introducing modern CMake and renaming
some build options caused this issue. It's hopefully fixed nor, or
at least improved.

Todo: the code in question needs to be revised anyway.
2024-02-22 19:42:57 +01:00
ManoloFLTK 957becbe28 Fix: fl_height(int, int) decreases the font size after each call (#915) 2024-02-21 09:38:24 +01:00
ManoloFLTK 681e22a452 Add scale_handler first so it has least priority of all handlers 2024-02-20 21:47:43 +01:00
ManoloFLTK 69d7991acc FL_MENU_TOGGLE/RADIO items do not update in macOS menu bar (#916) 2024-02-20 18:41:12 +01:00
ManoloFLTK ba5ed296e9 Improve implementation of the macOS Window menu
The macOS Window menu is connected to the item array of the  macOS menubar
via FL_SUBMENU_POINTER. This facilitates memorization of pointers
to items of the macOS menubar because the item array no longer changes
each time a window opens of gets closed.
2024-02-20 16:00:01 +01:00
Matthias Melcher 4649188cf6 Remove unused FLUID documentation refs in CMake config 2024-02-20 15:03:08 +01:00
Matthias Melcher fe9ecec1be Remove unfinished FLUID documentation.
A copy of the docs exists in my repo clone and
will be merged back when the docs are useful and
part of the CMake setup.
2024-02-20 15:00:49 +01:00
Matthias Melcher 8cce99b2c7 Typo 2024-02-20 14:35:54 +01:00
Matthias Melcher 2f343ad64d
Fix Terminal character position and add word selection (#906)
* Improve horizontal interactive selection
* Using half-character positions to implement selection
  similar to Fl_Input.
* Add word and line selection
* Fix vertical position of text
2024-02-18 13:29:37 +01:00
Greg Ercolano eb4916344b Clear screen also clears attributes/xterm modes (#911)
Clear was setting characters to a space using the current style,
but if the style left Dim/Bold/Inverse (etc) enabled, that was being
used to affect the clear character, and thus affected clearing screen.

Seems weird tho; what if one wants to do a cleol (\033[K) on a screen
that is all inverted text; is there no way to use inverse mode for
clearing to the end of line? Or to delete a character?
2024-02-17 07:59:42 -08:00
ManoloFLTK 3ecadc0a8e Update bundled libjpeg to version 9f 2024-02-17 12:20:28 +01:00
ManoloFLTK bf938da079 Update bundled libpng to version 1.6.42 2024-02-17 12:20:28 +01:00
ManoloFLTK b90437119d Update bundled zlib to version 1.3.1 2024-02-17 12:20:28 +01:00
Greg Ercolano 00cdb1757f Added attribute checks to test/terminal for recent changes. 2024-02-16 13:14:15 -08:00
Greg Ercolano 58a1496389 Fixed Fl_Terminal xterm color 39/49 handling, and other mods.
Fixed a bug in the handling of xterm color 39 + 49, which avoids
applying Dim/Bold if default color is the special "see through" color
0xffffff00. A test will be added to test/terminal to excercise this
in a follow up commit.

Renamed CharStyle::?gcolor_uchar() -> CharStyle::?gcolor_xterm()
for a consistent naming convention.

Changed fltk_fg_color() from a static func to a CharStyle method
because it needs to access the defaultcolor for the special cases
for xterm colors 39 and 49.

Made CharStyle::attr_color() private, as per Jonathan Griffitts request
in issue #909.

Improved docs regarding effects of Dim/Bold for xterm and non-xterm color
methods.

Fl_Terminal::text?gcolor_xterm() methods now use CharStyle::?gcolor_xterm()
methods, removing the duplicate code logic.
2024-02-16 13:10:06 -08:00
Greg Ercolano 1069ebc1b6 Fix Fl_Terminal xterm CharStyle charflags (#909) 2024-02-16 04:46:05 -08:00
Greg Ercolano cc562761c2 Fix text overflow in fluid widget panel (#908)
Made fonts slightly smaller,
enlarged/moved some widgets in Alignment: group.
2024-02-15 09:25:28 -08:00
Albrecht Schlosser 0987c763ec CMake: fix "LIBDECOR_PLUGIN_DIR" undefined error
This could happen on Linux if built with CMake option
  "-DFLTK_USE_SYSTEM_LIBDECOR=OFF"
2024-02-14 22:57:55 +01:00
Albrecht Schlosser b282ee0335 CMake: remove unintended debug output 2024-02-14 17:51:51 +01:00
Albrecht Schlosser 7992b0b9ab CMake: fix installation on macOS
fluid and fltk-options are now installed correctly as bundles and as
stand-alone executables side by side in the 'bin' folder relative
to CMAKE_INSTALL_PREFIX.

This works but the installation folders may be changed in the future.

Targets fltk::fluid is now exported correctly so

  find_package(FLTK CONFIG ...)

works with both the build folder and an installed version.
2024-02-14 17:06:10 +01:00
Albrecht Schlosser cd3cb62770 CMake: simplify resources.cmake
Note: CheckIncludeFiles caches the result in an 'internal' variable.
Hence mark_as_advanced() is not necessary for these variables.
2024-02-13 16:15:46 +01:00
Albrecht Schlosser 0771bc6cee CMake: improve formatting, remove debug statements 2024-02-13 15:10:06 +01:00
Albrecht Schlosser bddcecd28a CMake: set FLTK_VERSION and FLTK_FLUID_EXECUTABLE in the cache
This is useful if FLTK is built as a subproject, for instance by
using FetchContent.
2024-02-12 16:53:20 +01:00
ManoloFLTK cf551ddf5a Improve recognition of re-scaling shortcuts - cont'd 2024-02-11 19:10:39 +01:00
Albrecht Schlosser 4ea058da0a Update examples/CMakeLists.txt to modern CMake
Also: set build requirement of OpenGL3 tests to C++11 to enable
building in C++98 mode (if the compiler allows C++11).

Note: this may be removed in 1.5.0 when FLTK requires C++11 anyway.
2024-02-11 16:06:17 +01:00
ManoloFLTK 2776071144 Improve recognition of re-scaling shortcuts w/ various keyboard layouts 2024-02-11 11:07:03 +01:00
ManoloFLTK 63b0bcf599 KDE+X11 keyboard stops working after menu display (#904) 2024-02-11 08:23:23 +01:00
Albrecht Schlosser 179c5d3521 CMake: fix some weird internal dependencies (Wayland/X11)
Improve recognition of Wayland and X11 specific build options and
remove duplicates from required dependencies (FLTK_LDLIBS) used in
fltk-config.

This should also fix the GitLab CI build process.

To do: the logic to find the dependencies of Wayland and X11 is
currently suboptimal. This will be improved in a later commit.
2024-02-10 16:27:38 +01:00
Matthias Melcher a7bc26e12a FLUID: Fix double reverse logic in FL_COMMAND handling 2024-02-10 14:55:52 +01:00
Matthias Melcher 1ed14867e6 Fixes FLUID shortcut generation
and makes the C++ code human readable
2024-02-10 14:28:33 +01:00
Albrecht Schlosser f4af40fe55 Modern CMake: export shared libraries and fltk-options 2024-02-10 14:19:09 +01:00
Albrecht Schlosser 809ceea075 Fix Cairo related build issues (missing Cairo lib)
... particularly for shared libs
2024-02-09 19:41:45 +01:00
Albrecht Schlosser ede53b8a50 Fix cairo_test-shared build as well (#902) 2024-02-09 17:35:26 +01:00
ManoloFLTK ffeaeec5bd Move FLTK_USE_SVG from config.h to FL/fl_config.h 2024-02-09 13:36:16 +01:00
Albrecht Schlosser 3895068aa1 Fix "cairo_test fails to link due to undefined's" (#902)
Restore "too much optimized" CMake code.

The issue would only be visible if neither FLTK_GRAPHICS_CAIRO nor
FLTK_BACKEND_WAYLAND was active.
2024-02-09 12:38:14 +01:00
ManoloFLTK fc6d364057 Change parameters of Fl_Wayland_Window_Driver::delete_cursor() 2024-02-09 10:04:13 +01:00