Skip to content

Commit

Permalink
Mostly fix XP theme
Browse files Browse the repository at this point in the history
The css @media thing seems to be broken (at least on 2003 with OCAPI), idk why. I think I did it right but I'm also r3tard.
  • Loading branch information
K4sum1 committed Nov 24, 2024
1 parent 3dcbed4 commit 2d30042
Show file tree
Hide file tree
Showing 9 changed files with 325 additions and 55 deletions.
10 changes: 10 additions & 0 deletions browser/themes/windows/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@
}
}

/* add extra margin for unmaximized windows
on Win XP Luna themes to look consistent */
@media not (-moz-windows-classic) {
@media (-moz-platform: windows-xp) {
:root[tabsintitlebar]:not([sizemode="maximized"]) .titlebar-buttonbox-container {
margin-top: 4px;
}
}
}

/* Window control buttons */

.titlebar-min {
Expand Down
5 changes: 5 additions & 0 deletions layout/style/nsMediaFeatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) {
#if defined(XP_WIN)
case StylePlatform::Windows:
return true;
case StylePlatform::WindowsWinXP: {
if (!IsVistaOrLater()) {
return true;
}
}
#elif defined(ANDROID)
case StylePlatform::Android:
return true;
Expand Down
2 changes: 2 additions & 0 deletions servo/components/style/gecko/media_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,8 @@ pub enum Platform {
Macos,
/// Matches any Windows version.
Windows,
/// Matches only Windows XP.
WindowsWinXP,
}

fn eval_moz_platform(_: &Context, query_value: Option<Platform>) -> bool {
Expand Down
Loading

0 comments on commit 2d30042

Please sign in to comment.