Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the position of window previews/tray overflow menu #160

Open
drake-lol opened this issue Dec 31, 2024 · 5 comments
Open

Changing the position of window previews/tray overflow menu #160

drake-lol opened this issue Dec 31, 2024 · 5 comments

Comments

@drake-lol
Copy link

I have been working on a dock layout for my taskbar that combines the tray and icons into one panel. Everything works good except for the tray overflow menu and the window previews being too far to the left. How would I go about adjusting the position for those?
notioverflow
appicon

@drake-lol
Copy link
Author

My settings are
{"theme":"DockLike","resourceVariables[0].variableKey":"","resourceVariables[0].value":"","controlStyles[0].target":"Taskbar.TaskbarFrame#TaskbarFrame > Grid#RootGrid","controlStyles[0].styles[0]":"Margin=0,1,0,3","controlStyles[0].styles[1]":"CornerRadius=22","controlStyles[0].styles[2]":"BorderThickness=5","controlStyles[0].styles[3]":"BorderBrush:=Transparent","controlStyles[1].target":"Grid#SystemTrayFrameGrid","controlStyles[1].styles[0]":"Margin=-1325,1,-615,3","controlStyles[2].target":"Windows.UI.Xaml.Controls.Grid","controlStyles[2].styles[0]":"HorizontalAlignment=Center","controlStyles[0].styles[4]":"Grid.Row=0","controlStyles[0].styles[5]":"Padding=7,0,200,0","controlStyles[1].styles[1]":"Background=Transparent","controlStyles[1].styles[2]":"FlowDirection=0","controlStyles[3].target":"SystemTray.DateTimeIconContent","controlStyles[3].styles[0]":"Canvas.ZIndex=1","controlStyles[4].target":"Taskbar.TaskListButton","controlStyles[4].styles[0]":"CornerRadius=360","controlStyles[5].target":"Taskbar.ExperienceToggleButton","controlStyles[5].styles[0]":"CornerRadius=360"}

@bbmaster123
Copy link
Collaborator

the issue here is the HorizontalAlignment=Center, if you remove that, it should fix the problem.
let me know if that helps :)

@SandTechStuff
Copy link

This is the style that is causing the problem:
Target: Windows.UI.Xaml.Controls.Grid
Style: HorizontalAlignment=Center

The target you choose is applying HorizontalAlignment=Center to every single Grid element there is. This has unintended consequences, such as the preview and tray overflow misalignment.

I haven't found the exact Grid element to apply HorizontalAlignment=Center to that retains the original look you are going for, but searching with UWPSpy for Grid elements should lead you in the right direction.

Another solution may be to figure out what Grid element the tray overflow and previews rely on, and setting styles to override the universal HorizontalAlignment=Center on those Grid elements only.

@SeagulltheIV
Copy link

This looks sick. Can we get this as a theme with everything working well? I tried the config out and there is another issue where if you have windows defender or some other app icons on the status tray, they kind of merge with the pinned application on the taskbar.
I wish I knew how to fix all this but I just got into coding this month and am doing the freeCodeCamp course. So I feel very overwhelmed by everything. Heck, it even took a whole hour just to learn how to apply the config to my Windhawk.

Will come back to this after I become a bit more knowledgeable. And if no one else does the work by that time.

@bbmaster123
Copy link
Collaborator

@SeagulltheIV
I'd be happy to try fixing any outstanding issues.

I do have a tutorial with step by step instructions & pictures you can use to help get started styling things, but it was offline all last week due to my account accidently getting flagged by github's automated system. You can see it here

Luckily, you don't need to know much about coding to do any of this in the styler mods. There is a certain amount of xaml style code, but no logic/code behind, and no other languages unless you plan to write a whole new mod down the road. I'm sure you'll learn a lot more overall from your coding course than by styling your taskbar with windhawk alone.

If you get stuck at any point you can create a new issue, and we'll be happy to help :)
In the meantime, I'll see what I can do regarding the tray and post back here when there's some progress.

cheers :)

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

No branches or pull requests

4 participants