Skip to content

Conversation

@iav
Copy link

@iav iav commented Jan 14, 2026

This branch improves NPBackup GUI for small screens and fixes Windows 7 compatibility.

PART 1: Small Screen Support (useful for all platforms)

All GUI improvements work on any platform and screen size.

  1. Resizable Windows

    • All main windows are now resizable with minimum size constraints
    • Works properly on screens as small as 800x600
    • Windows remember their size and adapt to available space
  2. Resizable Panes

    • Added draggable dividers between UI sections
    • Operations window: resizable split between snapshot table and action buttons
    • Progress window: resizable split between stdout and stderr output
    • Users can adjust proportions to their preference
  3. Compact Layouts

    • Operations window header made more compact (smaller logo, combined text)
    • Reduced default row counts in tree views for better initial fit
    • All elements properly expand when window is resized
  4. About Dialog Enhancements

    • Version string is now selectable with mouse for copying
    • Click on version string to copy entire text to clipboard
    • Visual confirmation popup when copied

These changes improve usability on netbooks, tablets, VMs, and remote desktop sessions where screen space is limited.

PART 2: Windows 7 Compatibility Fix

Fixed restic crash on Windows 7 when using VSS snapshots.

Problem:

  • Official restic binaries crash on Windows 7/Server 2008 R2 when VSS is enabled
  • Root cause: Go 1.21+ dropped Windows 7 API support
  • Restic 0.18.x built with standard Go uses unavailable system calls

Solution:

  • Use restic built with patched Go compiler (win7sup patch by DRON-666)
  • The patch restores Windows 7 compatibility in Go 1.23/1.24
  • Added GitHub Actions workflow to automate legacy restic builds
  • Updated and documented legacy_restic_builder.cmd script

Technical requirements for Windows 7:

  • Python 3.8 (last version supporting Windows 7)
  • Restic built with go1.24.x-win7sup or similar patched Go
  • NPBackup legacy build (compiled with Python 3.8)

Bug fixes:

  • Fixed sg.Popup_error typo (should be sg.PopupError) in config.py
  • Removed stray character breaking legacy_restic_builder.cmd

Tested successfully on Windows 7 SP1 x64:

  • Backup with VSS snapshots
  • Full restore operation
  • All GUI windows and dialogs

iav and others added 3 commits January 12, 2026 07:13
- GitHub Actions workflow for Win7 x64/x86 builds (standalone, like upstream)
- PowerShell and Batch build scripts for local builds
- Uses Python 3.8 (last version with Win7 support)
- Builds triggered on push to win7 branch, x64 by default

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add window_utils.py with functions to fit windows to screen size
- Use Windows API (SPI_GETWORKAREA) to get work area without taskbar
- Make main windows resizable: main, config, operations, content, restoration
- Automatically resize windows that exceed available screen space

Fixes issue where windows were too large for 1080p and smaller screens.
Related to upstream issue netinvent#175.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Make all main windows resizable (config, main, operations, restore, ls)
- Wrap TabGroup in scrollable Column to keep buttons fixed at bottom
- Add expand_x/expand_y to inner containers for proper resizing
- Call .expand() after window finalization for correct layout
- Set num_rows=2 for paths Tree to ensure minimum height
- Add horizontal scrolling support
- Buttons stay visible and fixed at window bottom

This allows windows to work on screens as small as 750x500 pixels.
@deajan
Copy link
Contributor

deajan commented Jan 14, 2026

A PR should be one feature at a time.
Please separate the UI stuff from the Windows 7 stuff in separate PRs for review.

At a first glance:

  • The UI code that your AI generated makes UI unusable even on my test systems (have a look at the operation center).
    Resizable windows is okay, but only on small screens. On bigger ones, it should stay as it is.

  • Also, what's the point of making the version string selectable for copying ?

  • Why was the random variable in linux example conf file dropped ?

For the windows 7 patch:

  • I don't see the point here of making a compile script for windows 7 that already exists. VSS fails when trying x64 binaries on x86 platforms and vice-versa, I see no need to reinvent the wheel here.
  • The "typo" in config.py your AI detected is just a shortcut from the UI framework, no problem with that. Btw, why is this in the Win7 fix and not on the generic UI fix part ?

Please just don't use AI to recode anything without checking.
If you have an issue with Windows 7, open an issue since we support legacy builds anyway

Btw, a UI refresh is currently being written, which will improve overall aesthetics. Again, I'm really not against any improvements, but there's definitly a minimum code standard which plain AI without human comprehension cannot be achieved here.

Thank you for the time you put into this. Happy to help you improve said PRs.

iav and others added 7 commits January 15, 2026 03:24
- Add set_minimum_window_size() function using tkinter minsize()
- Set minimum sizes for all windows (prevents buttons from hiding):
  * Main window: 500x300
  * Config window: 600x400
  * Operations window: 550x400
  * Restore window: 400x150
  * LS window: 600x400
- Improve button layout with sg.Push() for proper centering
- Add DPI awareness for Windows 7 (SetProcessDPIAware)
- Fix horizontal expansion: add size=(None,None) for scrollable Column
- Fix tab character in examples/npbackup.linux.conf.dist
- Add test script (test_window_fitting_win7.py)
- Add Windows 7 documentation (WINDOWS7_WINDOW_SIZING.md)
- Operations window: compact header with smaller logo, Pane between
  table and buttons for resizable split, uniform button widths
- About window: add resizable and minimum size
- Statistics window: add resizable and minimum size

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Reduce Tree num_rows from 40 to 10 for better fit on small screens
- Add expand_x/y to Column for proper resizing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Version string can now be selected with mouse for copying, and clicking
on it copies the entire string to clipboard with visual confirmation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove stray "8" character introduced by linter in baba83f
- Add comments explaining Windows 7 support and win7sup Go patch
- Update RESTIC_VERSION from 0.18.0 to 0.18.1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This workflow builds restic with a patched Go compiler (win7sup) that
restores Windows 7/Server 2008 R2 support. Official Go dropped Win7
support in Go 1.21.

Features:
- Manual trigger with configurable restic and Go versions
- Builds both x86 and x64 architectures
- Creates artifacts with version info in name
- Uses DRON-666's win7sup patch for Go

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace restic 0.18.1 legacy binaries built with standard go1.23.0
with new binaries built using go1.24.2-win7sup patched compiler.

This fixes restic crashes on Windows 7/Server 2008 R2 when using
VSS snapshots.

Built automatically via build-legacy-restic.yml workflow.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@iav
Copy link
Author

iav commented Jan 15, 2026

  • The UI code that your AI generated makes UI unusable even on my test systems (have a look at the operation center).
    Resizable windows is okay, but only on small screens. On bigger ones, it should stay as it is.

After the proposed changes, on screens that are large enough, all windows should be shown size as you made them. However, I can't check it, since I don't have such screens. But if you know what is wrong and with which of the windows, AI and I will try to fix it.
What's wrong with Operation Center?

I checked all the windows and manually created the configuration, did a backup, restore, looked at the statistics, ran a purge... so I'm asking for more details about the "UI unusable even on my test systems." I know it sounds trivial, but "everything works for me, I ran it."

  • Also, what's the point of making the version string selectable for copying ?

To allow somebody not only to see version string, but provide this information to somebody via electronic communications. If you made this information available, you most likely assumed someone might need it. For example, to post a message on a forum.
But if for some reason this is unacceptable, I will, of course, immediately remove this change.

  • Why was the random variable in linux example conf file dropped ?

I didn't pay enough attention to the AI's performance. This change is a mistake and has already been reverted. So have other changes related to removing extra spaces at the ends of lines.

Win7

  • I don't see the point here of making a compile script for windows 7 that already exists. VSS fails when trying x64 binaries on x86 platforms and vice-versa, I see no need to reinvent the wheel here.

Guthub Runner was the easiest and fastest way for me to get a working binary for Windows 7. If everything else sometime can be accepted, I'll remove it from the set if it's redundant. But I need it for test builds. So for now, while I'm still hoping you'll accept the changes to window sizes and related adaptations—it will remain in this set. Simply as a testing tool.

The "typo" in config.py your AI detected is just a shortcut from the UI framework, no problem with that. Btw, why is this in the Win7 fix and not on the generic UI fix part ?

There was shown kind of error, I don't remember what. Not just "AI" — AI reacts to error. Kind of lint, maybe? Sorry, don't remember. I saw this change (it was the first change in the code), and I also thought that it was some accidentally pressed button in the text editor, a trivial error.
No problem to get it back — just tell it.

UI refresh is currently being written, which will improve overall aesthetics. Again, I'm really not against any improvements

This is gratifying, but the desire to work with small screens was already there, but definitely did not meet with enthusiasm. Well, everyone has different priorities, that's normal.
I can say, just for information, that small windows can be needed not only on small screens, but also with severe myopia, when you have to look at the screen from a very close distance, as well as with problems with the width or height of the field of view.
Well, the OpenSource method is "do it yourself". With the help of AI, I plucked up the courage and got what "works for me" (I use it myself).
So thank you for a great program!

@deajan
Copy link
Contributor

deajan commented Jan 25, 2026

After the proposed changes, on screens that are large enough, all windows should be shown size as you made them. However, I can't check it, since I don't have such screens. But if you know what is wrong and with which of the windows, AI and I will try to fix it.

I am sorry, but providing PRs without being able to test them creates much more work for me
As said earlier, I am currently undergoing a UI refactor in order to make things a bit less awful.
I will try to add small screen support, but I can't just merge some non tested AI only contribution.

Once my new GUI stuff is merged (excpect it quite soon), feel free to test/comment in order for things to get smooth.

@iav
Copy link
Author

iav commented Jan 26, 2026

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants