Open gavrant opened 11 months ago
This breaks fractional scaling, resulting in oversized interface at 150% UI scale. Also results in "large icons" being way too big. Previously 150% with large icons resulted in a UI that has just the right size, While this solves #59 it does so by making the interface unusably large at 150% UI scale.
That being said - the viewport is cut-off at launch if you do not resize the window.
@ja231c , I just committed a possible fix for "making the interface unusably large at 150% UI scale." Could you test it?
That being said - the viewport is cut-off at launch if you do not resize the window.
Do I correctly understand the issue as "on opening NifSkope, its main window does not fit on the screen, with its parts being cut-off"? If yes, it's probably an artefact of applying the saved sizes and positions from the old non-scaled UI to the new upscaled one. Does the issue go away if you resize and position the main window properly to fit on the screen, close NifSkope, then open it again?
General note on the whole High DPI thing: on my current 1080p config, it's rather painful to work with UI scales greater than 100%. So I would appreciate any testing and feedback from actual high DPI users.
150% scale now works properly.
Although I would like to request that the "large icons" (but without extra scaling at 150%, at higher use extra scaling) be used if at 150% and up even when "large icons" are disabled (enabling "large icons" should make them bigger); reason: they're sharper than the regular icons.
Regarding the 3d viewport, screenshots here: at start:
after resize:
It's like the "at start" image every start, not just the first one, if it was just the first one I wouldn't even bother mentioning it.
Also, the "Windows XP" theme does not work, although this is not a problem with those changes, original Dev 9 had the "Windows" theme not functional, then there was updates that made the "Windows" theme work but the "Windows XP" not work, the problem is that the "Windows XP" theme is the better theme, more legible, more compact and all that.
Although I would like to request that the "large icons" (but without extra scaling at 150%, at higher use extra scaling) be used if at 150% and up even when "large icons" are disabled (enabling "large icons" should make them bigger); reason: they're sharper than the regular icons.
Wouldn't your suggestion conflict with #59? To quote its author, @GammaMetroid: "Even using the large icons option, they are still rather small on my screen".
To be clear about the whole situation with the toolbar icons, in NifSkope they are simple 36x36 or 32x32 images, not vector or multi-size "adaptive" icons, so they look nice in the "large icons" mode and with 100% UI scale (because they are not downscaled or upscaled), but become so-so in the "small icons" mode or with non-100% scales. Potentially, I can fix this by replacing the images with .svg's or something, but first I'd like to know where the current NifSkope icons came from almost 10 years ago, and this is a question to @hexabits .
Regarding the 3d viewport...
Good news: I reproduced the behavior and even found the culprit, just need some time to come with a proper fix.
the "Windows XP" theme...
That's a known issue. Rumor has it Qt broke the theme in an update. I was going to research this sometime later.
What I'm suggesting is using the "large icons" without any scaling when "large icons" are disabled at 150% ui scale (and with less scaling above 150%), else people at 150% and higher ui scale will have lower resolution icons after this is merged because the "large icons" are really really big when scaled to up to match ui scale.
With "large icons" enabled it should scale them like normal; "large icons" off 150% ui scale should result in "large icons" with no scaling, as in, same behavior we have now with "large icons" enabled.
I've found another issue with high dpi with these changes, namely the UV editor doesn't fill the whole window, this time resizing the window does nothing to alleviate the issue.
@ja231c, the commits https://github.com/gavrant/nifskope/commit/a63c5e15b2b7e350010349a63f84414054848b19 and https://github.com/gavrant/nifskope/commit/f5f5de93be93d278b1d5d81795ef7ac5148d7d63 above fixed the mis-sized 3D viewport and UV editor you reported. Doing something about the toolbar icons scaling is next in my todo list.
One other thing: NifSkope currently does not scale the viewport "UI" stuff (wireframes, grids, "vertex blobs", etc.). Would you benefit from thicker wireframe and grid lines, and bigger grid cells and "vertex blobs" at UI scale 150%? In the "Hitting UI and its scaling again" commit, I implemented this for the XYZ axes gizmo, its lines now become longer and thicker with UI scaling, so could you try it out?
@gavrant i can test it out on my screen if you send me a build. i don't know how to compile nifskope. thicker wireframes does sound helpful
@GammaMetroid, here's my latest internal build: NifSkope-2023-12-10.zip
Note 1: at the moment, only the XYZ axes gizmo in the viewport is affected by your system UI scale, wireframes are not affected yet. I also slightly zoomed in the camera of that gizmo to better utilize the empty space to the left and at the bottom of its corner, so even on a 100% scale display it would appear a bit larger than it used to be in an older NifSkope build.
Note 2: this build also contains a fix for your https://github.com/hexabits/nifskope/issues/59, so with 300% UI scale, the toolbar icons (and all other images in the UI) will tripple in size. Does it look good?
@gavrant looks much better! the icons are a bit pixelated now, but maybe i am just used to the "large" icons. this video shows how they look using the normal, not large icons. maybe it could be better to use the large icons scaled down for different system UI scale, rather than the small ones scaled up? but it's really just aesthetics at this point, the functionality is much better.
the UV editor looks good to me, only thing i notice is that the first movement of the scroll wheel resets the zoom in that window.
also i'm not sure if this is new since i was pretty much unable to use the LOD slider before but it seems to be broken, in that moving it at all makes the higher LOD levels disappear permanently, and they don't reappear without restarting nifskope.
https://github.com/hexabits/nifskope/assets/101038501/6605d005-e45a-4d66-ad19-b187243ac532
@GammaMetroid Yeah, that pixelation on scaling is inevitable unless NifSkope gets new "HD" or vector icons.
I'll fix the bugged mouse wheel zoom in UV editor.
As for the LOD thing, I think it came from the Starfield commits from September, a cousin of https://github.com/hexabits/nifskope/issues/51 issue, and is not related to UI scaling. I'm going to address that too, but not right now.
Question: would you like the collision box and wireframe lines becoming 3 times thicker with your 300% UI scale? To give you an impression of how it would look like, here's a screenshot of the same wrbreezehome01 on my 1080p display with 100% UI scale, view it in fullscreen:
@gavrant yes, that would definitely be a welcome change. it's handy to be able to click on the collision wireframe to jump right to the shape block, rather than expanding down the tree view to get to it. thicker lines would make that much easier
EDIT: A human-readable version of the changes can be found here: https://github.com/gavrant/nifskope/releases