xp classic style for js paint

This commit is contained in:
Bao Nguyen
2023-03-11 20:11:30 +07:00
parent cbf98673e7
commit be28c29b8e

View File

@@ -166,6 +166,7 @@
// Wait for systemHooks object to exist (the iframe needs to load)
waitUntil(()=> jspaint.systemHooks, 500, ()=> {
// Hook in
load_theme();
jspaint.systemHooks.showSaveFileDialog = async ({ formats, defaultFileName, defaultPath, defaultFileFormatID, getBlob, savedCallbackUnreliable, dialogTitle }) => {
await save_file_as();
};
@@ -205,6 +206,122 @@
}
}
function load_theme(){
iframe.contentWindow.load_theme_from_text(`
; Copyright © Microsoft Corp.
[Theme]
; Windows Classic - IDS_THEME_DISPLAYNAME_CLASSIC
DisplayName=Windows XP Classic
SetLogonBackground=0
; Computer - SHIDI_SERVER
[CLSID\\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\DefaultIcon]
DefaultValue=%SystemRoot%\\System32\\imageres.dll,-109
; UsersFiles - SHIDI_USERFILES
[CLSID\\{59031A47-3F72-44A7-89C5-5595FE6B30EE}\\DefaultIcon]
DefaultValue=%SystemRoot%\\System32\\imageres.dll,-123
; Network - SHIDI_MYNETWORK
[CLSID\\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\\DefaultIcon]
DefaultValue=%SystemRoot%\\System32\\imageres.dll,-25
; Recycle Bin - SHIDI_RECYCLERFULL SHIDI_RECYCLER
[CLSID\\{645FF040-5081-101B-9F08-00AA002F954E}\\DefaultIcon]
Full=%SystemRoot%\\System32\\imageres.dll,-54
Empty=%SystemRoot%\\System32\\imageres.dll,-55
[Control Panel\\Cursors]
Arrow=
Help=
AppStarting=
Wait=
NWPen=
No=
SizeNS=
SizeWE=
Crosshair=
IBeam=
SizeNWSE=
SizeNESW=
SizeAll=
UpArrow=
DefaultValue=Windows default
DefaultValue.MUI=@themeui.dll,-2043
[Control Panel\\Desktop]
Wallpaper=
TileWallpaper=0
WallpaperStyle=10
Pattern=
[Control Panel\\Desktop\\WindowMetrics]
[Control Panel\\Colors]
ActiveTitle=10 36 106
Background=58 110 165
Hilight=10 36 106
HilightText=255 255 255
TitleText=255 255 255
Window=255 255 255
WindowText=0 0 0
Scrollbar=212 208 200
InactiveTitle=128 128 128
Menu=212 208 200
WindowFrame=0 0 0
MenuText=0 0 0
ActiveBorder=212 208 200
InactiveBorder=212 208 200
AppWorkspace=128 128 128
ButtonFace=212 208 200
ButtonShadow=128 128 128
GrayText=128 128 128
ButtonText=0 0 0
InactiveTitleText=212 208 200
ButtonHilight=255 255 255
ButtonDkShadow=64 64 64
ButtonLight=212 208 200
InfoText=0 0 0
InfoWindow=255 255 225
GradientActiveTitle=166 202 240
GradientInactiveTitle=192 192 192
[Metrics]
IconMetrics=76 0 0 0 139 0 0 0 139 0 0 0 1 0 0 0 245 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 84 97 104 111 109 97 0 119 0 0 7 0 0 0 0 0 216 31 7 0 28 52 1 1 216 31 7 0 176 36 1 1
NonclientMetrics=84 1 0 0 1 0 0 0 16 0 0 0 16 0 0 0 18 0 0 0 18 0 0 0 245 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 188 2 0 0 0 0 0 0 0 0 0 0 84 97 104 111 109 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 0 0 0 15 0 0 0 245 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 188 2 0 0 0 0 0 0 0 0 0 0 84 97 104 111 109 97 0 0 80 37 11 0 0 0 0 0 140 221 6 0 227 115 247 119 2 40 11 0 7 0 0 0 18 0 0 0 18 0 0 0 245 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 84 97 104 111 109 97 0 0 0 0 0 0 60 222 6 0 50 71 252 119 120 1 7 0 76 73 252 119 8 6 7 0 245 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 84 97 104 111 109 97 0 119 0 0 7 0 120 1 7 0 120 1 7 0 40 37 11 0 120 1 7 0 120 1 7 0 245 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 84 97 104 111 109 97 0 0 92 1 0 0 136 4 0 0 40 37 1 1 0 0 7 0 184 221 6 0 46 75 232 119
CaptionFont=@themeui.dll,-2037
SmCaptionFont=@themeui.dll,-2038
MenuFont=@themeui.dll,-2039
StatusFont=@themeui.dll,-2040
MessageFont=@themeui.dll,-2041
IconFont=@themeui.dll,-2042
[VisualStyles]
Path=%SystemRoot%\\Resources\\Themes\\Aero\\AeroLite.msstyles
ColorStyle=NormalColor
Size=NormalSize
HighContrast=4
ColorizationColor=0X7F000000
AutoColorization=0
VisualStyleVersion=10
[boot]
SCRNSAVE.EXE=
[MasterThemeSelector]
MTSM=RJSPBS
[Sounds]
; IDS_SCHEME_DEFAULT
SchemeName=@%SystemRoot%\\System32\\mmres.dll,-800
`);
}
</script>