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

Font size is ridiculously large #16

Open
SanderBouwhuis opened this issue Oct 2, 2021 · 4 comments
Open

Font size is ridiculously large #16

SanderBouwhuis opened this issue Oct 2, 2021 · 4 comments

Comments

@SanderBouwhuis
Copy link

SanderBouwhuis commented Oct 2, 2021

I upgraded from v2.4.x to v2.6.1.0 and now the GUI is all messed up. The fonts are extremely large! The window is 900x900 and takes up most of the screen where before the window would be nice and small. Also, the font is extremely large.
How can we change the font size?

Comparison

@windows-2048
Copy link
Owner

Did you touch c:\path\to\TheFastestMouseClicker.exe - Right Click -> Properties -> Compatibility -> Change High DPI Setings? You may play with that properties to fix your problem on Windows 10.

Or do you use Windows pior to Windows 7, like XP ir Vista? TheFastestMouseClicker.exe has built-in XML manifest to prevent large fonts and window sizes. But that manifest doesn't work on Windows XP or Vista. I support only Windows 7, 8.1 and 10 (and possibly 11).

Let me know what OS version do you use and whether you could fix the issue!

@SanderBouwhuis
Copy link
Author

I did not change any settings beforehand.
I went into properties and changed all the Change High DPI Settings one by one. None of them changed anything.

I am on Windows 10 English x64.

I cannot fix the issue.

@SanderBouwhuis
Copy link
Author

SanderBouwhuis commented Jan 3, 2022

Ok, I looked at the source and found your bug:

main.cpp on line 829:

struct _Sc
{
	int factor;
	_Sc() : factor(1)
	{
		int h, v;
		GetDesktopResolution(h, v);
		if (v > 1440)
			factor = 2; // Here is the bug. DON'T set a factor because Windows will handle the scaling correctly nowadays.
	}
} _sc;

int Sc(int x)
{
	return x * _sc.factor;
}

So, you don't need the _Sc structure and you don't need the Sc() function. Just always use factor = 1.

Remove this:

struct _Sc
{
	int factor;
	_Sc() : factor(1)
	{
		int h, v;
		GetDesktopResolution(h, v);
		if (v > 1440)
			factor = 2; // Here is the bug. DON'T set a factor because Windows will handle the scaling correctly nowadays.
	}
} _sc;


int Sc(int x)
{
  // return x * _sc.factor; 

  // Just always return x here. No scaling factor needed.
  return x;
}

I don't know how to submit a pull request for you (never done that). If you tell me how, I'll do that.
I'm also going to try to fix the bug where after pressing the toggle key, there is no clicking and I cannot move the mouse.

@windows-2048
Copy link
Owner

Thank you a lot for a fix. I'll incorporate it into new version.

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

2 participants