Skip to content

Only clamp width and height in Lock to usable area if rotation is 0 or 180#3815

Merged
gonX merged 1 commit into
OpenTabletDriver:0.6.xfrom
Kuuuube:lock-usable-area-fix
May 4, 2025
Merged

Only clamp width and height in Lock to usable area if rotation is 0 or 180#3815
gonX merged 1 commit into
OpenTabletDriver:0.6.xfrom
Kuuuube:lock-usable-area-fix

Conversation

@Kuuuube
Copy link
Copy Markdown
Member

@Kuuuube Kuuuube commented Feb 22, 2025

These make it annoying for users that rotate their area in some cases. Eg. #3811

In theory we could implement a way to shrink the area by exactly how much is needed to fit inside the tablet's usable area for any given rotation. But this feels really strange in practice like I'm fighting OTD to set the area and it's "randomly" changing things that weren't intended to be changed. So I think it's better to just let the user figure it out themselves.

The important thing with Lock to usable area is that users can easily set their area offsets exactly to the edges.

@Kuuuube Kuuuube added enhancement New feature or request gui Affects driver GUI labels Feb 22, 2025
Copy link
Copy Markdown
Member

@gonX gonX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just different from current behavior. I would prefer something that considers rotation, but I realize the general rotation handling isn't great either.
Rotating e.g. 45 degrees does not constrain the area properly even when moving around.

@gonX
Copy link
Copy Markdown
Member

gonX commented May 4, 2025

After further discussion on Discord the PR should instead disable the behavior on non-symmetric rotations, e.g. if rotation is 0 or 180, clamp dimensions, otherwise do not clamp.

/e: for further explanation, fixing this properly in Eto does not seem easy. Better to push for Avalonia unless someone else wants to look at fixing it properly.

@Kuuuube Kuuuube force-pushed the lock-usable-area-fix branch from c1c0256 to 5db459d Compare May 4, 2025 22:56
@Kuuuube Kuuuube changed the title Remove width and height restrictions from lock to usable area Only clamp width and height in Lock to usable area if rotation is 0 or 180 May 4, 2025
@Kuuuube Kuuuube force-pushed the lock-usable-area-fix branch from 5db459d to ad87e48 Compare May 4, 2025 22:58
Copy link
Copy Markdown
Member

@gonX gonX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested working, good change.

@gonX gonX merged commit 94b1f93 into OpenTabletDriver:0.6.x May 4, 2025
9 checks passed
@gonX gonX added this to the v0.6.5.2 milestone Aug 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request gui Affects driver GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants