valinet / WinCenterTitle

WinCenterTitle is a simple tool that allows you to center align the text in Windows 10 titlebars, the same way it was in Windows 8, 8.1, or even 3.1.
GNU General Public License v2.0
153 stars 16 forks source link

Another problem about left align the text #8

Closed ygjsz closed 3 years ago

ygjsz commented 3 years ago

Sorry for disturbing you again. I found an another problem. There's a little gap between the program icon and the text. And how to move the text closer to the program icon just like Windows 7 ? untitled

valinet commented 3 years ago

Try with the default Windows 8.1 theme. For me, it looks okay, the text starts right after the icon, as it is supposed to, so it probably is your custom theme that is not properly created. So, edit the theme and fix the text padding so it starts where you want it, closer to the icon.

You could also try with a negative offset in the uDWM patch, although I don’t think it would really work (instead of 0, which was 48c7c000000000c3, try 48c7c0f6fffffec3 for example, which is -10; try that, and adjust for other values, you never know). Generate these patches here: https://defuse.ca/online-x86-assembler.htm#disassembly . Make sure to choose x64 and click Assemble after you type text like this in the textbox:

mov rax, 0 ret

Change 0 to -10 accordingly. But I don’t think it will work for negative offsets, but who knows, try it. Also, a variant of the patch might be:

mov rax, 0 sub rax, 10 ret

So yeah, experiment with it, but as far as I can tell, this is out of the scope of this application anyway. And probably the right patch to do is to modify the theme a bit and properly align the label, probably the author offseted it more to the left to compensate for the larger Windows 7 window buttons so that the text still remains centered. I don’t have much experience with custom theming, look online for some tutorials, maybe you find something useful. Feel free to report back your findings, I am actually curious of the outcome, but for now, I will close this issue as it isn’t a problem of this software. But as I said, report back here if you succeed in any way, just so we all know how it’s done.

valinet commented 3 years ago

Solution to @ygjsz’s issue is in #9.