anthropic-code-agent[bot]
5ad46585b6
Fractional scaling
2026-03-22 19:58:16 +01:00
anthropic-code-agent[bot] and ashaduri
7346db784a
Add unit tests for fractional DPI scaling
...
- Create gui/tests directory structure with CMakeLists.txt
- Add test_fractional_scaling.cpp with comprehensive tests for:
- 125%, 150%, 175%, 225%, 250% fractional scaling calculations
- Correction ratio computation (system_scale / integer_ui_scale)
- DPI detection logic from various DPI values
- Edge cases: 100% and 200% integer scaling (no fractional)
- Tests verify the critical 250% case that was previously broken
- Integrate gui_tests into test_all executable
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com >
Agent-Logs-Url: https://github.com/ashaduri/gsmartcontrol/sessions/eb9277d5-ef45-4aee-8d6c-383739f37613
2026-03-22 17:06:49 +00:00
anthropic-code-agent[bot] and ashaduri
9f62577161
Fix fractional DPI scaling to store full percent and compute correction ratio
...
- Store full scale percent (e.g., 250 for 250%) in g_windows_fractional_scaling_percent
- Compute correction = system_scale / integer_ui_scale for proper >=200% scaling
- Update API docs to reflect full percent return value (not fractional remainder)
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com >
Agent-Logs-Url: https://github.com/ashaduri/gsmartcontrol/sessions/d146d9d4-4974-4ee0-bd7b-12a84ce237ea
2026-03-22 17:00:17 +00:00
anthropic-code-agent[bot] and ashaduri
a79907bd05
Address PR review comments
...
- Add forward declaration for Gtk::Window in gsc_init.h to fix compilation
- Use std::lround() instead of truncation for proper rounding in scaling
- Update include comments to reference app_apply_fractional_scaling_to_default_size()
Changes:
1. Forward declare Gtk::Window namespace to avoid requiring Gtkmm headers
2. Replace truncating cast with std::lround() for accurate scaling (e.g., 850*1.25 = 1062.5 → 1063 instead of 1062)
3. Fix include comments in gsc_text_window.h and gsc_info_window.cpp
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com >
2026-03-06 14:38:18 +00:00
anthropic-code-agent[bot] and ashaduri
b574294a51
Refactor: Extract fractional scaling logic to separate function
...
Extract the duplicated fractional scaling logic into a reusable function
`app_apply_fractional_scaling_to_default_size()` in gsc_init.cpp.
This eliminates code duplication across GscMainWindow, GscInfoWindow,
GscExecutorLogWindow, and GscTextWindow constructors.
The new function:
- Takes window pointer and configured sizes as parameters
- Handles all scaling logic in one place
- Makes it easier to maintain and extend
Addresses review feedback from @ashaduri.
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com >
2026-03-06 14:26:09 +00:00
anthropic-code-agent[bot] and ashaduri
f1fd685441
Adjust default window sizes for fractional HiDPI scaling on Windows
...
When fractional HiDPI scaling is used on Windows (e.g., 125%, 150%, 250%),
GTK3 only applies integer scaling to the UI, but fonts are scaled to match
the actual DPI. This causes windows to appear smaller than they should be.
This fix detects the fractional scaling percentage during app initialization
and applies it to the default window sizes for all major windows:
- Main window (560x450 → scaled by fraction)
- Info window (850x600 → scaled by fraction)
- Executor log window (900x650 → scaled by fraction)
- Text window (800x600 → scaled by fraction)
The scaling is only applied when:
1. Fractional scaling is detected on Windows
2. No custom window size has been configured by the user
This ensures windows scale proportionally with fonts, providing a consistent
user experience on Windows with fractional HiDPI scaling.
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com >
2026-03-04 21:58:06 +00:00
Alexander Shaduri
5343ba9dae
Cleanups
2026-03-04 22:48:21 +01:00
Alexander Shaduri
dadfd60ed3
Fix gcc shadow warning.
2025-11-25 19:29:46 +01:00
copilot-swe-agent[bot]
6c8fea7309
Add new natural sort order tests.
2025-11-25 19:29:28 +01:00
copilot-swe-agent[bot] and ashaduri
54425a306a
Implement natural sort order for drive names
...
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com >
2025-11-25 12:59:41 +01:00
Alexander Shaduri
44948de7d0
Fixed typos and updated visible copyright years.
2025-06-11 09:43:36 +02:00
Alexander Shaduri
6630116ba1
Properly implemented persistence of manually added devices ( #87 ). Added --forget-devices option to clear the list if any of the devices causes trouble.
2025-04-28 18:51:42 +04:00
Alexander Shaduri
1f7c2b6a92
Manually added devices can be persistent now.
2025-04-28 11:19:44 +00:00
Alexander Shaduri
e35c301605
Update gsc_info_window.cpp
...
Looking at the smartmontools code, it should be 65535 I believe.
2025-04-17 11:31:13 +04:00
checktext00
7af8dba9f3
update 36535 to 65536 hours
2025-04-16 11:58:09 +00:00
Alexander Shaduri
d7032eb351
Allow smartctl < 7.3 again, falling back to Text parser; this configuration is for compatibility only and not fully supported.
2025-02-24 13:52:04 +04:00
Alexander Shaduri
589c280bdc
Support saving smartctl output to text (using old text format) instead of json ( #76 ).
2025-02-15 13:22:47 +04:00
Alexander Shaduri
9f85d09736
Support standard (non-extended) self-test log in JSON ATA parser ( #79 ).
2025-02-14 13:48:30 +04:00
Alexander Shaduri
d45e5360cc
Temperature: Fixed reporting unreasonably large values when raw value encodes min/max values as well ( #78 ); support protocol-independent temperature reporting in JSON.
2025-02-14 13:28:43 +04:00
Alexander Shaduri
a5fddf1bb2
Use {fmt} instead of <format> to support older compilers.
2025-02-07 11:44:50 +04:00
Alexander Shaduri
515bf11c3d
Added self-test "lifetime hours" wrapping behavior to the column header tooltip.
2024-12-26 13:07:24 +04:00
Alexander Shaduri
a254c17fcb
Updated wikipedia links.
2024-12-10 18:26:40 +04:00
Alexander Shaduri
a57e543701
Windows: Avoid using non-integer font sizes.
2024-12-06 12:33:50 +04:00
Alexander Shaduri
8c96c02468
Add a note about DPI awareness limitations.
2024-11-26 13:43:45 +04:00
Alexander Shaduri
840398c073
Fix potential crash in attribute description database.
2024-11-19 12:58:45 +04:00
Alexander Shaduri
93384e4c37
Fix compiler warning.
2024-11-19 12:39:01 +04:00
Alexander Shaduri
566b11026e
Fix "Show SMART capable only" checkbox not having effect.
2024-11-07 14:48:18 +04:00
Alexander Shaduri
066eaec993
Windows: Use Adwaita theme by default, win32 theme has too many problems (with Classic theme and with fractional dpi scaling).
2024-11-06 14:11:08 +04:00
Alexander Shaduri
746ebf9b02
Windows: Re-enable dpi awareness and scale up the font in case of fractional scaling.
2024-11-06 13:57:59 +04:00
Alexander Shaduri
7ac61f1cac
Fix crash on startup in Windows.
2024-11-06 12:37:48 +04:00
Alexander Shaduri
99bf00d27c
Fixed running "Update smartctl database" on Windows; use argv on all platforms so it is more secure.
2024-11-05 14:53:19 +04:00
Alexander Shaduri
7fd43bba2c
Info window: Don't use Gtk::Stock for icons.
2024-11-05 14:15:19 +04:00
Alexander Shaduri
b785a4fbec
Replace bundled icons with the ones from Oxygen project; bundle removable drive icon; update copyrights accordingly.
2024-11-05 14:00:33 +04:00
Alexander Shaduri
3aa5ddfc32
Test results are presented in a more obvious manner now.
2024-11-04 20:38:47 +04:00
Alexander Shaduri
c2277edb56
Show smartctl database version in basic properties.
2024-11-04 17:07:20 +04:00
Alexander Shaduri
d82ec219f6
Refactoring: Split out property description code for ATA Attribute and ATA Statistic into separate files.
...
Added descriptions and warnings to NVMe Attributes.
Storage Property: Rely less on reported name (not as useful with JSON parser), more on generic name.
2024-11-04 16:56:10 +04:00
Alexander Shaduri
dc007c84ab
Fix ATA testing with when JSON parser is used.
2024-11-04 13:11:19 +04:00
Alexander Shaduri
74c5e92d4b
Do not remove NVMe devices namespaces if a device has more than one namespace.
2024-10-31 16:21:43 +04:00
Alexander Shaduri
aaa374c8ed
Fix self-test status execution returning error.
2024-10-31 16:21:15 +04:00
Alexander Shaduri
2a6902dbb5
Support self-tests on WD NVMe with smartctl < 7.5.
2024-10-31 16:05:07 +04:00
Alexander Shaduri
02206a8967
Minor code cleanups.
2024-10-31 15:56:23 +04:00
Alexander Shaduri
af2a5a18b3
"Perform Tests" menu item is correctly disabled now if self-tests are not supported; if support is unknown, an appropriate message is shown after the Info window is displayed.
2024-10-31 15:47:42 +04:00
Alexander Shaduri
1d0e325813
JSON Basic Parser: Make sure the health property is in the health section (fixes GUI not displaying health after first scan).
2024-10-31 15:21:02 +04:00
Alexander Shaduri
f4e22a5c96
Windows: Add a note about why hidpi is disabled.
2024-10-31 15:18:01 +04:00
Alexander Shaduri
fb468f8594
Windows: Fixed auto-detection issues, minor refactoring of the detection code.
2024-10-31 14:26:20 +04:00
Alexander Shaduri
4ff0aaad9c
Hide self-test tab if NVMe does not support self-tests.
2024-06-11 13:53:23 +04:00
Alexander Shaduri
c795635469
Improve device type detection.
2024-06-11 13:47:11 +04:00
Alexander Shaduri
e844b9949d
Detection of NVMe self-test support.
2024-06-11 13:46:57 +04:00
Alexander Shaduri
5c807e1859
Fix missing include.
2024-06-11 13:29:35 +04:00
Alexander Shaduri
b2edaf69c1
Fix data member naming convention.
2024-06-11 13:29:25 +04:00