forked from ImSwordQueen/firefox-native-controls
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d72edfa
commit de15b44
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# HG changeset patch | ||
# User daylin <[email protected]> | ||
# Date 1706144999 25200 | ||
# Wed Jan 24 18:09:59 2024 -0700 | ||
# Node ID 3db86a39b5c9930d3642bfd417c2166019dd1157 | ||
# Parent 1be366378c56d2cb64171ff9f714292f50641bbe | ||
Native Controls: Revise override caption button width/height | ||
|
||
# This is a patch that is applied on top of the 115.6.0 R2 patch. It simply revises this custom behaviour: | ||
|
||
diff --git a/widget/windows/nsUXThemeData.cpp b/widget/windows/nsUXThemeData.cpp | ||
--- a/widget/windows/nsUXThemeData.cpp | ||
+++ b/widget/windows/nsUXThemeData.cpp | ||
@@ -200,22 +200,26 @@ void nsUXThemeData::UpdateTitlebarInfo(H | ||
int overrideCaptionButtonsHeight = StaticPrefs:: | ||
widget_ev_native_controls_patch_override_aero_caption_buttons_mask_height(); | ||
|
||
- if (overrideCaptionButtonsWidth && overrideCaptionButtonsHeight) { | ||
- sCommandButtonBoxMetrics.cx = overrideCaptionButtonsWidth; | ||
- sCommandButtonBoxMetrics.cy = overrideCaptionButtonsHeight; | ||
- sCommandButtonBoxMetricsInitialized = true; | ||
- sTitlebarInfoPopulatedAero = true; | ||
- } else if (SUCCEEDED(DwmGetWindowAttribute( | ||
- aWnd, DWMWA_CAPTION_BUTTON_BOUNDS, &captionButtons, | ||
- sizeof(captionButtons)))) { | ||
+ if (SUCCEEDED(DwmGetWindowAttribute(aWnd, DWMWA_CAPTION_BUTTON_BOUNDS, | ||
+ &captionButtons, | ||
+ sizeof(captionButtons)))) { | ||
sCommandButtonBoxMetrics.cx = | ||
captionButtons.right - captionButtons.left - 3; | ||
sCommandButtonBoxMetrics.cy = | ||
(captionButtons.bottom - captionButtons.top) - 1; | ||
+ | ||
+ if (overrideCaptionButtonsWidth > 0) { | ||
+ sCommandButtonBoxMetrics.cx = overrideCaptionButtonsWidth; | ||
+ } | ||
+ | ||
+ if (overrideCaptionButtonsHeight > 0) { | ||
+ sCommandButtonBoxMetrics.cy = overrideCaptionButtonsHeight; | ||
+ } | ||
+ | ||
sCommandButtonBoxMetricsInitialized = true; | ||
- MOZ_ASSERT( | ||
- sCommandButtonBoxMetrics.cx > 0 && sCommandButtonBoxMetrics.cy > 0, | ||
- "We must not cache bad command button box dimensions"); | ||
+ // MOZ_ASSERT( | ||
+ // sCommandButtonBoxMetrics.cx > 0 && sCommandButtonBoxMetrics.cy > 0, | ||
+ // "We must not cache bad command button box dimensions"); | ||
sTitlebarInfoPopulatedAero = true; | ||
} | ||
} |