Maximizing window causes info panel to open partially #37463

Closed
opened 2013-11-15 04:15:41 +01:00 by gandalf3 · 17 comments
Member

System Information
Archlinux 64bit with KDE

Blender Version

Broken: Blender 2.69 from the Arch repos

Short description of error

Full screening blender makes the info window drop down partway.
This is a very small annoyance, but it is still annoying closing it back up every time I maximize blender.

Exact steps for others to reproduce the error

  1. Start blender.
  2. Maximize the blender window. The info panel will end up partway down. If it started full screen, unfullscreen it and then maximize/fullscreen again.
**System Information** Archlinux 64bit with KDE **Blender Version** Broken: Blender 2.69 from the Arch repos **Short description of error** Full screening blender makes the info window drop down partway. This is a very small annoyance, but it is still annoying closing it back up every time I maximize blender. **Exact steps for others to reproduce the error** 1. Start blender. 2. Maximize the blender window. The info panel will end up partway down. If it started full screen, unfullscreen it and then maximize/fullscreen again.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @gandalf3

Added subscriber: @gandalf3

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges

Confirmed on OS X.

We should somehow glue the info bar to the top. Sometimes (after a new startup.blend has committed) or on some screens, there is a gap too.

Confirmed on OS X. We should somehow glue the info bar to the top. Sometimes (after a new startup.blend has committed) or on some screens, there is a gap too.
Member

Added subscriber: @CodeManX

Added subscriber: @CodeManX
Member

Not sure if i should create a new report for this:

Operator log is often not scrolled to the bottom and behaves weird on area resize (scrollbar should stick to the end to show latest entry by default).

Not sure if i should create a new report for this: Operator log is often not scrolled to the bottom and behaves weird on area resize (scrollbar should stick to the end to show latest entry by default).

Added subscriber: @AnthonyEdlin

Added subscriber: @AnthonyEdlin

Added subscriber: @BartekMoniewski

Added subscriber: @BartekMoniewski

@ThomasDinges is right. If editor height is as tall as header this editor shouldn't scale.

@ThomasDinges is right. If editor height is as tall as header this editor shouldn't scale.

Yeah it's a pretty old problem going back a long ways. Currently the screen scaling code just doesn't consider what type of area is being scaled. It's just inherent in the current design of screen verts/edges that don't link to the areas at all.

It may be possible to change the design slightly. Such as make screen edges more prominent and include links to what is on each side of the split edge, another edge or an area. Then you could traverse the screen edges in some scaling algorithm and scale based on the type of areas traversed.

It might also be better to just replace the design with something else entirely. The screen verts/edges code is pretty old, in fact, the structs in the header file go back to the initial revision in 2002. But a bigger redesign would touch a lot more code.

Either way it's not really a small change. Any change would probably require touching area drawing code, area move/split ops, resize/scaling code, and dna screen vert/edge structs would probably have to change, which would require proper setup for backwards/forward compatibility. All this work for just this issue, which isn't that big in the scheme of things. If there were more things to fix in the UI with a bigger design change it would maybe be more worth it.

I looked into this a long time ago, but there wasn't really any action in the UI at the time, so it's kind of been out of my mind. I'll try to ponder this again now and see if I can think of an easier way to do this or if there are more benefits to a larger design change.

Yeah it's a pretty old problem going back a long ways. Currently the screen scaling code just doesn't consider what type of area is being scaled. It's just inherent in the current design of screen verts/edges that don't link to the areas at all. It may be possible to change the design slightly. Such as make screen edges more prominent and include links to what is on each side of the split edge, another edge or an area. Then you could traverse the screen edges in some scaling algorithm and scale based on the type of areas traversed. It might also be better to just replace the design with something else entirely. The screen verts/edges code is pretty old, in fact, the structs in the header file go back to the initial revision in 2002. But a bigger redesign would touch a lot more code. Either way it's not really a small change. Any change would probably require touching area drawing code, area move/split ops, resize/scaling code, and dna screen vert/edge structs would probably have to change, which would require proper setup for backwards/forward compatibility. All this work for just this issue, which isn't that big in the scheme of things. If there were more things to fix in the UI with a bigger design change it would maybe be more worth it. I looked into this a long time ago, but there wasn't really any action in the UI at the time, so it's kind of been out of my mind. I'll try to ponder this again now and see if I can think of an easier way to do this or if there are more benefits to a larger design change.

I suppose that can be solved without linking areas to editor types. We get size of screen and every area and check which elements are "one header" tall. Then exclude them from scaling operation. Converting pixels to DPI points will be required to do this.
Nevertheless this concept will work only when info bar will stay one header tall. Check this: #37450 (Tool settings panel location in the UI) According to this discussion we can assume that info bar will be 2 to 3 times higher than actual. Then Krash scenario will come true eventually.

I suppose that can be solved without linking areas to editor types. We get size of screen and every area and check which elements are "one header" tall. Then exclude them from scaling operation. Converting pixels to DPI points will be required to do this. Nevertheless this concept will work only when info bar will stay one header tall. Check this: #37450 (Tool settings panel location in the UI) According to this discussion we can assume that info bar will be 2 to 3 times higher than actual. Then Krash scenario will come true eventually.

Realistically, you could just add a hack that would just go through after the current scale algorithm and just scale back any verts for the info space type. That would probably be less then 30 lines of code. In fact, here is the code that does it.

	/* scale back info header areas if we scaled up */
	if (facy > 1.0) {
		for (sa = sc->areabase.first; sa; sa = sa->next) {
			if(sa->spacetype == SPACE_INFO) {
				int size = sa->v2->vec.y - sa->v1->vec.y;
				ScrEdge *se = screen_findedge(sc, sa->v4, sa->v1);
				
				/* get size if we were to rescale back down */
				tempf = ((float)size) / facy;
				size = (short)(tempf + 0.5);
			
				/* raise edge, but make sure it's not an edge along the bottom of window*/
				if (se && sa->v1 != sa->v2 && sa->v1->vec.y > 0) {
					int yval;
					
					select_connected_scredge(sc, se);
					
					/* all selected vertices get the right offset */
					yval = sa->v2->vec.y - size;
					sv = sc->vertbase.first;
					while (sv) {
						/* if is a collapsed area */
						if (sv != sa->v2 && sv != sa->v3) {
							if (sv->flag) sv->vec.y = yval;
						}
						sv = sv->next;
					}
				}
			}
		}
	}

Doing this actually solves this particular issue. But I personally wouldn't want to do this, as it only solves this one problem and in a very brute force manner. You can quickly break it down if you try to do non-standard areas. If people always do this type of stuff, then blender source will become unmaintainable. A more general solution and consideration of the entire system is needed I think, which is the part I was trying to think about in my previous comment.

Realistically, you could just add a hack that would just go through after the current scale algorithm and just scale back any verts for the info space type. That would probably be less then 30 lines of code. In fact, here is the code that does it. ``` /* scale back info header areas if we scaled up */ if (facy > 1.0) { for (sa = sc->areabase.first; sa; sa = sa->next) { if(sa->spacetype == SPACE_INFO) { int size = sa->v2->vec.y - sa->v1->vec.y; ScrEdge *se = screen_findedge(sc, sa->v4, sa->v1); /* get size if we were to rescale back down */ tempf = ((float)size) / facy; size = (short)(tempf + 0.5); /* raise edge, but make sure it's not an edge along the bottom of window*/ if (se && sa->v1 != sa->v2 && sa->v1->vec.y > 0) { int yval; select_connected_scredge(sc, se); /* all selected vertices get the right offset */ yval = sa->v2->vec.y - size; sv = sc->vertbase.first; while (sv) { /* if is a collapsed area */ if (sv != sa->v2 && sv != sa->v3) { if (sv->flag) sv->vec.y = yval; } sv = sv->next; } } } } } ``` Doing this actually solves this particular issue. But I personally wouldn't want to do this, as it only solves this one problem and in a very brute force manner. You can quickly break it down if you try to do non-standard areas. If people always do this type of stuff, then blender source will become unmaintainable. A more general solution and consideration of the entire system is needed I think, which is the part I was trying to think about in my previous comment.

This issue was referenced by blender/blender-addons-contrib@91d8519c47

This issue was referenced by blender/blender-addons-contrib@91d8519c478252f06f4043a68060f5c60ed6c6a1

This issue was referenced by 91d8519c47

This issue was referenced by 91d8519c478252f06f4043a68060f5c60ed6c6a1

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 91d8519c47.

Closed by commit 91d8519c47.

This issue was referenced by e8c9e85401

This issue was referenced by e8c9e85401ef6162656cf3b10c5aec509ae8a850
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#37463
No description provided.