-
Notifications
You must be signed in to change notification settings - Fork 63
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
GPII-1716: Windows font-size #506
base: master
Are you sure you want to change the base?
Changes from 8 commits
d4d416f
34e40f2
6f77671
74a7630
02f9c4f
f54ebf7
bd67cb1
e261f54
52f0a12
0f96070
9f67b19
1ef6bab
50ff3f0
542ba7a
eeac4eb
05ad1e7
79fe482
bba86ec
81da090
44308d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1876,6 +1876,184 @@ | |
] | ||
}, | ||
|
||
"com.microsoft.windows.fontSize": { | ||
"name": "Windows Font Size", | ||
"contexts": { | ||
"OS": [ | ||
{ | ||
"id": "win32", | ||
"version": ">=5.0" | ||
} | ||
] | ||
}, | ||
"settingsHandlers": { | ||
"configure.NonClientMetrics": { | ||
"type": "gpii.windows.spiSettingsHandler", | ||
"options": { | ||
"getAction": "SPI_GETNONCLIENTMETRICS", | ||
"setAction": "SPI_SETNONCLIENTMETRICS", | ||
"uiParam": "struct_size", | ||
"pvParam": { | ||
"type": "struct", | ||
"name": "NONCLIENTMETRICS" | ||
}, | ||
"fWinIni": "SPIF_UPDATEINIFILE|SPIF_SENDCHANGE", // It won't update if these flags aren't set. | ||
// The next GET will be different to the last SET, because the value of lfHeight sets the character | ||
// height (negated), but receives it as the cell height. | ||
"verifySettings": false | ||
}, | ||
"supportedSettings": { | ||
"CaptionFont": {}, | ||
"SmallCaptionFont": {}, | ||
"MenuFont": {}, | ||
"StatusFont": {}, | ||
"MessageFont": {}, | ||
"CaptionHeight": {}, | ||
"SmCaptionHeight": {}, | ||
"MenuHeight": {} | ||
}, | ||
"capabilities": [ | ||
"http://registry\\.gpii\\.net/common/fontSize" | ||
], | ||
"capabilitiesTransformations": { | ||
"CaptionFont": { | ||
"transform": { | ||
"type": "fluid.transforms.linearScale", | ||
"factor": -1, | ||
"inputPath": "http://registry\\.gpii\\.net/common/fontSize", | ||
"outputPath": "value" | ||
}, | ||
"path": { | ||
"literalValue": "pvParam.lfCaptionFont.lfHeight" | ||
} | ||
}, | ||
"SmallCaptionFont": { | ||
"transform": { | ||
"type": "fluid.transforms.linearScale", | ||
"factor": -1, | ||
"inputPath": "http://registry\\.gpii\\.net/common/fontSize", | ||
"outputPath": "value" | ||
}, | ||
"path": { | ||
"literalValue": "pvParam.lfSmCaptionFont.lfHeight" | ||
} | ||
}, | ||
"MenuFont": { | ||
"transform": { | ||
"type": "fluid.transforms.linearScale", | ||
"factor": -1, | ||
"inputPath": "http://registry\\.gpii\\.net/common/fontSize", | ||
"outputPath": "value" | ||
}, | ||
"path": { | ||
"literalValue": "pvParam.lfMenuFont.lfHeight" | ||
} | ||
}, | ||
"StatusFont": { | ||
"transform": { | ||
"type": "fluid.transforms.linearScale", | ||
"factor": -1, | ||
"inputPath": "http://registry\\.gpii\\.net/common/fontSize", | ||
"outputPath": "value" | ||
}, | ||
"path": { | ||
"literalValue": "pvParam.lfStatusFont.lfHeight" | ||
} | ||
}, | ||
"MessageFont": { | ||
"transform": { | ||
"type": "fluid.transforms.linearScale", | ||
"factor": -1, | ||
"inputPath": "http://registry\\.gpii\\.net/common/fontSize", | ||
"outputPath": "value" | ||
}, | ||
"path": { | ||
"literalValue": "pvParam.lfMessageFont.lfHeight" | ||
} | ||
}, | ||
// The pixel heights will grow, but will not shrink back, so set the value to something so it will | ||
// be restored. | ||
"CaptionHeight": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why all these last transformations don't have mappings to common terms? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These values set the height of the element - they're listed here so they are set back to the same value. Without them, a larger font will make the height grow, but restoring a smaller font doesn't make the height shrink back down. |
||
"transform": { | ||
"type": "fluid.transforms.literalValue", | ||
"inputPath": "pvParam.iCaptionHeight", | ||
"outputPath": "value" | ||
}, | ||
"path": { | ||
"literalValue": "pvParam.iCaptionHeight" | ||
} | ||
}, | ||
"SmCaptionHeight": { | ||
"transform": { | ||
"type": "fluid.transforms.literalValue", | ||
"inputPath": "pvParam.iSmCaptionHeight", | ||
"outputPath": "value" | ||
}, | ||
"path": { | ||
"literalValue": "pvParam.iSmCaptionHeight" | ||
} | ||
}, | ||
"MenuHeight": { | ||
"transform": { | ||
"type": "fluid.transforms.literalValue", | ||
"inputPath": "pvParam.iMenuHeight", | ||
"outputPath": "value" | ||
}, | ||
"path": { | ||
"literalValue": "pvParam.iMenuHeight" | ||
} | ||
} | ||
} | ||
}, | ||
"configure.IconTitle": { | ||
"type": "gpii.windows.spiSettingsHandler", | ||
"options": { | ||
"getAction": "SPI_GETICONTITLELOGFONT", | ||
"setAction": "SPI_SETICONTITLELOGFONT", | ||
"uiParam": "struct_size", | ||
"pvParam": { | ||
"type": "struct", | ||
"name": "LOGFONT" | ||
}, | ||
// Because configure.NonClientMetrics is called after this one, fWinIni doesn't need to be set here. | ||
"verifySettings": true | ||
}, | ||
"supportedSettings": { | ||
"IconTitleFont": {} | ||
}, | ||
"capabilities": [ | ||
"http://registry\\.gpii\\.net/common/fontSize" | ||
], | ||
"capabilitiesTransformations": { | ||
"IconTitleFont": { | ||
"transform": { | ||
"type": "fluid.transforms.linearScale", | ||
"factor": -1, | ||
"inputPath": "http://registry\\.gpii\\.net/common/fontSize", | ||
"outputPath": "value" | ||
}, | ||
"path": { | ||
"literalValue": "pvParam.lfHeight" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"configure": [ | ||
"settings.configure.IconTitle", | ||
"settings.configure.NonClientMetrics" | ||
], | ||
"restore": [ | ||
"settings.configure.IconTitle", | ||
"settings.configure.NonClientMetrics" | ||
], | ||
"isInstalled": [ | ||
{ | ||
"type": "gpii.deviceReporter.alwaysInstalled" | ||
} | ||
] | ||
}, | ||
|
||
"com.microsoft.windows.stickyKeys": { | ||
"name": "Windows StickyKeys", | ||
"contexts": { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank God we now have comments!