Commit Graph

175 Commits

Author SHA1 Message Date
WerWolv 89004574d3 impr: Handle provider opening more centrally, switch to existing provider if same file is being opened again 2025-12-17 12:55:34 +01:00
WerWolv baa3329e7f fix: Make sure providers returned by createProvider don't get deleted unexpectedly 2025-12-16 23:36:05 +01:00
WerWolv 8f57dd86af
fix: Typos 2025-12-01 19:33:21 +01:00
WerWolv 98369600c3 impr: Various rendering performance improvements 2025-09-17 20:46:15 +02:00
WerWolv e0fccacc32 fix: Nightlies always having an update available, even if we're already on latest 2025-08-27 23:05:00 +02:00
WerWolv d920718b44 build: Refactor ImHexAPI into multiple separate files 2025-08-14 20:16:40 +02:00
WerWolv 4ca429e389 impr: Allow post-processing shaders to be set dynamically 2025-08-14 17:11:37 +02:00
WerWolv 63711f652f fix: Fonts being scaled twice as big by default on macOS 2025-08-13 20:24:00 +02:00
WerWolv 6febe9982b impr: Significantly reduce memory usage 2025-08-12 18:00:47 +02:00
WerWolv ad2a36676c fix: Issues when running the updater on Linux 2025-08-11 17:44:49 +02:00
WerWolv 66e407549e fix: Missing return value in update function 2025-08-09 23:49:59 +02:00
WerWolv 0870ab4d3c feat: Add option to check for updates to the Extras menu 2025-08-09 23:46:15 +02:00
WerWolv 6be0eeff72 impr: Allow more release types to be updated 2025-08-09 23:31:07 +02:00
WerWolv d925c8216d impr: Allow ImHex to be used without subpixel rendering on Windows if only OpenGL 3 is available 2025-08-09 19:13:45 +02:00
WerWolv fd2d50508b fix: Update nightly update detection logic to work with release changes 2025-08-09 12:10:25 +02:00
WerWolv 82ceb2e11f impr: Better auto updater, added support for updating nightlies 2025-08-08 21:25:52 +02:00
WerWolv 9cff9043ee impr: Remove hex::format, improve format and logging type safety 2025-08-06 20:02:23 +02:00
WerWolv 3cf7622707 impr: Make font size a multiplicative value 2025-08-05 22:19:43 +02:00
paxcut a9eb7b2d25
fix: fixed auto save projects not being done after the first one. (#2366)
Currently setting the time interval to auto save the project has no
effect other than creating one initial save if the input file is
unsaved. When a file is created and not saved it remains in a dirty
state which prevented setting the state of the autosaved project to
needing to be saved. Fixed by decoupling the state of the provider from
the state of the autosave. When a provider is detected as being dirty it
always makes the autosave as being needed once the time interval has
elapsed.

feat: Implemented the menus on the main menu bar that will be available
when the text editor has focus. It allows you to load and save patterns
using open and save and will tack changes if files on disk are modified
externally. It also only opens the file chooser the first time you save
a pattern file and subsequent changes save to the same file.

If you want to save into another file and have the new file be tracked
you can use Save As. Finally, export doesn't track the file on disk at
all. this feature uses the same changes tracker class used elsewhere in
imHex.

fix: Changed the defaults of various shortcuts that were using Alt + a
key to avoid possible problems with some keyboards. Shouldn't affect end
users as their shortcuts are loaded from internal file but those who
complain about the Alt key misbehaving will be asked to reset the keys
to the new defaults. In addition, all globally accessible shortcuts were
added the Allow while typing flag so that they can be used in any field
that accepts text.

New menu entries were added for debugging to make the pattern editor and
the hex editor menus more like each other.

Finally, the call to RegisterMainMenuEntries() when initializing views
was moved to occur after the call to registerViews() so that menus are
not repeated when set for different views.
2025-08-02 01:29:34 -07:00
WerWolv f73866b86e impr: Speed up initial resource loading and event handling slightly 2025-08-02 01:14:00 +02:00
WerWolv fd8bdbdc90 fix: Icons being too big for regular text 2025-07-31 20:32:59 +02:00
WerWolv 280dea23d0 fix: Font point calculation not respecting framebuffer scale 2025-07-30 22:33:16 +02:00
WerWolv 46b13b6606 impr: Nicer font registering API 2025-07-28 18:02:33 +02:00
WerWolv f42ae97f14 impr: Added more generic way to unlock frame rate when needed 2025-07-27 16:25:10 +02:00
WerWolv ec424ac16e fix: Assert when plugins failed to load 2025-07-27 15:11:01 +02:00
WerWolv 8782be593d feat: Added ability to draw Bold and Italic text 2025-07-26 14:22:50 +02:00
WerWolv c1545b57c9 impr: Cleanup font loading API, fix CJK glyphs being rendered way too large 2025-07-25 23:06:44 +02:00
WerWolv 5782236379 impr: Disable hinting for pixel perfect font 2025-07-11 15:04:21 +02:00
WerWolv 4520637aed fix: Pixel perfect font not scaling correctly 2025-07-11 14:54:54 +02:00
WerWolv 82c318f91d fix: Crash when no plugins could be loaded 2025-07-10 16:36:37 +02:00
Nik d1840a2184
build: Update ImGui to v1.92.1 (#2325)
Update ImGui to the latest version and rewrite most of the font handling
code
2025-07-10 10:00:39 +02:00
WerWolv f341413248 fix: Crash when opening diff view
#2269
2025-05-26 18:34:00 +02:00
paxcut 5c4cf7379f
feat: Added Subpixel Font rendering (#2092)
Proof of concept for implementing subpixel processing in ImGui. This is
work in progress, and it is bound to have problems.

What it does:
1) Uses freetype own subpixel processing implementation to build a
32-bit color atlas for the default font only (no icons, no unifont) . 2)
Avoids pixel perfect font conversion when possible. 3) Self contained,
no ImGui source code changes.
4) Results in much improved legibility of fonts rendered on low dpi LCD
screens that use horizontal RGB pixel layouts (no BRG or OLED or CRT if
they even exist anymore)

What it doesn't:
1) Fancy class based interface. The code is barely the minimum needed to
show it can work. 2) Dual source color blending. That needs to be
implemented in shader code, so it needs to change ImGui source code
although minimally. This will result in some characters appearing dimmer
than others. Easily fixed with small fragment and vertex shaders. 3)
subpixel positioning. If characters are very thin they will look
colored, or they can be moved to improve legibility. 4) deal with
detection of fringe cases including rare pixel layouts, non LCD screens,
Mac-OS not handling subpixel rendering and any other deviation from the
standard LCD. 5) tries to be efficient in speed or memory use. Font
Atlases will be 4 times the size they were before, but there are no
noticeable delays in font loading in the examples I have tried.

Any comments and code improvements are welcome.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2025-05-11 15:36:32 +02:00
WerWolv ccaf1e33c0 build: Make this modules stuff actually mostly work on Clang 2025-02-18 00:39:53 +01:00
WerWolv e484587778 fix: Don't parse version string on every call 2025-02-16 20:08:10 +01:00
WerWolv bf10d333cd fix: Default scale of Web version on macOS 2025-02-16 16:35:37 +01:00
WerWolv 54f3bc0262 impr: Use heuristic to determine backing scale factor on the web 2025-02-15 22:30:06 +01:00
WerWolv e232a2b33d fix: Web build rendering 2025-02-15 22:23:49 +01:00
WerWolv 73a3b217a4 fix: Scaling on the web version 2025-02-15 21:26:03 +01:00
WerWolv 419787e17c impr: Make auto updater work better on Windows 2025-02-15 16:46:36 +01:00
WerWolv 83e0ce0042 fix: Corporate environment detection not working correctly 2025-02-15 11:09:20 +01:00
WerWolv 6b11028b72 impr: Use proper function to get environment variables 2025-02-05 13:47:38 +01:00
WerWolv 08335041f5 fix: Crash on Linux uf XDG_SESSION_TYPE is not set 2025-02-05 09:40:13 +01:00
WerWolv 5084009d62 fix: Invalid iterator dereference when removing providers 2025-02-01 20:10:13 +01:00
WerWolv 24e7c2f3db fix: Make sure all textures are destroyed before glfw gets uninitialized 2025-01-27 22:10:30 +01:00
WerWolv 93e5d62782 fix: Web build scaling 2025-01-25 20:12:21 +01:00
WerWolv f976988c75 impr: Try to detect backing scaling factor on the web build 2025-01-25 19:08:56 +01:00
Wolf b646ece14b
impr: Refactor and restructure Event Manager (#2082)
### Problem description
This PR addresses issue #2013 that described a cluttered Event Manager.

This is a DX issue and should not impact the users whatsoever.

### Implementation description
The changes revolve around three main points:

1. the Event Manager (`event_manager.hpp`) was split into four
categories: GUI, Interaction, Lifecycle, and Provider, and two types:
Events, and Requests. This results in the following files:
    - `events_gui.hpp`
    - `events_interaction.hpp`
    - `events_lifecycle.hpp`
    - `events_provider.hpp`
    - `requests_gui.hpp`
    - `requests_interaction.hpp`
    - `requests_lifecycle.hpp`
    - `requests_provider.hpp`

2. Every event and request now has its own piece of documentation, with
a `@brief`, accompanied by a longer comment if needed, and gets its
`@param`s described.

3. The old `event_manager.hpp` import was removed and replaced by the
correct imports wherever needed, as to reduce spread of those files only
to where they are truly useful.

### Additional things
The commits have been split into (chrono-)logical steps:
- `feat`: split the Event Manager, and replace the imports
- `refactor`, `chore`: make various small changes to match the required
structure
- `docs`: add documentation for events and requests

Hopefully, this will help to review the PR.
*Note: Beware of very long rebuild times in between the commits, use
them sparingly! The Actions will ensure this PR builds anyways*

Closes #2013

---------

Signed-off-by: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com>
Co-authored-by: Nik <werwolv98@gmail.com>
2025-01-25 15:32:07 +00:00
WerWolv 117eb1e2a7 feat: Added more granular font settings
Fixes #1260
2025-01-18 23:34:43 +01:00
WerWolv 3129d6e8fd impr: Simplified custom font selection 2025-01-18 19:03:55 +01:00