Skip to content

Fixed Bar sizing issue#170

Merged
josteink merged 2 commits intoworkspacer:masterfrom
Eyu-Tech:bar-sizing-issue
Jan 8, 2021
Merged

Fixed Bar sizing issue#170
josteink merged 2 commits intoworkspacer:masterfrom
Eyu-Tech:bar-sizing-issue

Conversation

@Eyu-Tech
Copy link
Copy Markdown
Contributor

@Eyu-Tech Eyu-Tech commented Jan 6, 2021

@josteink
Copy link
Copy Markdown
Member

josteink commented Jan 7, 2021

I really can't see why this change should fix your issues. And I kinda don't like fixing bugs by making changes which in theory shouldn't ... change things. Basically I don't like magic 😄

On the other hand I can't see how this change can cause any other negative adverse effects, so unless anyone else objects, I'm OK with merging this.

@Eyu-Tech
Copy link
Copy Markdown
Contributor Author

Eyu-Tech commented Jan 7, 2021

Yes I was also quite confused.
But this morning I realized that there is a gap in Y direction.
So I checked what is happening again.

The Gap
Scaling
Scaling2
Monitor Settup

It hit me when I saw 24 to 30 => 30/24 = 1,25 which is the Windows scaling of Monitor 1 and 3. Monitor 2 is the only one at a scaling on 100%.
Basically this.Location = new Point(....) will cause some scaling after the width and height are set and change them to x/125

I don't know how this could be prevented as Point is a class inside System.Windows.Forms.Control and I can't debug into it to see who is the baddy

- not the best solution but it works so far
@Eyu-Tech
Copy link
Copy Markdown
Contributor Author

Eyu-Tech commented Jan 7, 2021

I updated the Branch.

Now the size will be overwritten after the scaling happened. It's not a good solution an quite ugly in my opinions but it works so far.
Maybe some one else can test the scaling behavior to confirm the issue/fix.

@josteink
Copy link
Copy Markdown
Member

josteink commented Jan 7, 2021

I notice you set the Height only, and then later set both Height and Width.

Is that intentional or a slip?

@Eyu-Tech
Copy link
Copy Markdown
Contributor Author

Eyu-Tech commented Jan 7, 2021

It's intentional, if the Height is not set before the Location is assigned with Point, the bar will slide up by the difference of the scaling. So in my case the bar was 6px up outside of the screen.
So the height must be set before the scaling happens, then the scaling does it stuff and then I reset the height to the intended value.

@josteink josteink merged commit ebab365 into workspacer:master Jan 8, 2021
@josteink
Copy link
Copy Markdown
Member

josteink commented Jan 8, 2021

Oh well. Consider it merged then 😄

@dalyIsaac dalyIsaac added this to the 0.9.11 milestone Jun 29, 2021
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.

3 participants