Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Hi dpi support in windows. #502

Merged
merged 4 commits into from
Feb 11, 2015
Merged

Hi dpi support in windows. #502

merged 4 commits into from
Feb 11, 2015

Conversation

abose
Copy link
Contributor

@abose abose commented Feb 10, 2015

  1. Adding HiDPI assets[Minimize, maximize, close, restore button] for windows at 1.25, 1.5,2 and 2.5x scale factors.
  2. Changing Application manifest to enable HiDPI support.
  3. Loading title bar icons based on current system scale factor.

Adding HiDPI assets[Minimize, maximize, close, restore button] for
windows at 1.25, 1.5,2 and 2.5x scale factors.
1. Changing Application manifest to enable HiDPI support.
2. Loading titlebar icons based on current system scale factor.
@nethip
Copy link
Contributor

nethip commented Feb 10, 2015

@JeffryBooher @redmunds Could you please take a look at this PR.

UINT scaleFactor = GetDPIScalingX();

//win HiDPI - Macro for loading button resources for scale factors start
#define ButtonResources(scale)\
Copy link
Contributor

Choose a reason for hiding this comment

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

Move this out and put in global scope of this file.

@nethip
Copy link
Contributor

nethip commented Feb 10, 2015

Also please change the indentation from tabs to spaces.

1. replaced tabs with spaces
2. fixed issues with 1.25x scaled assets
3. slight refactor
#define IDB_RESTORE_HOVER_BUTTON_1X 310
#define IDB_RESTORE_PRESSED_BUTTON_1X 311

#define IDB_CLOSE_BUTTON_125X 312
Copy link
Contributor

Choose a reason for hiding this comment

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

I find the naming convention 125X, 150X, and 250X versus 1X and 2X confusing. Maybe 1_25X, 1_50X, and 2_50X ?

@JeffryBooher
Copy link
Contributor

Instead of having a different resource for each scale factor, couldn't we just get a really big scale of the image (say 200%) and scale it down with GDI+ to the size we need? I guess we would need to see how good the scaling algorithm is but if the OS adds the ability to scale to more sizes then this will become difficult to manage. It's actually already a little difficult to manage on the resource side as @redmunds points out.

@abose
Copy link
Contributor Author

abose commented Feb 11, 2015

I tried scaling 2.5x images , but the downscaled images looked very bad in when scaled then down to 1.2x(the close button reduced to around 5 dots!). Also scaled up images looked pixelated. We just have 4 icons in the title bar to HiDpi-fi and i presume all the rest are svg in cef. With these being the only icons, i think we can keep these icons in these scale factors in the microsoft way untill they come up with some vector solution.

1. Changing resource names
nethip added a commit that referenced this pull request Feb 11, 2015
Hi dpi support in windows.
@nethip nethip merged commit 84101ee into master Feb 11, 2015
@nethip nethip deleted the HiDPI branch February 11, 2015 09:50
nethip added a commit that referenced this pull request Dec 8, 2015
Hi dpi support in windows.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants