Dark RTL viewer, remove constant path in script
|
@ -14,6 +14,7 @@ This script automatically copies the resources and creates shortcuts to ensure e
|
||||||
- Run `install.ps1` in an administrator powershell prompt
|
- Run `install.ps1` in an administrator powershell prompt
|
||||||
- requires admin access to i) modify registry entries to change file association to script and ii) copy icons and stylesheet to intel Quartus directory
|
- requires admin access to i) modify registry entries to change file association to script and ii) copy icons and stylesheet to intel Quartus directory
|
||||||
- Optional: Rename or remove the old shortcut. This depends on your installation (Mine is under `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Intel FPGA 23.1std.1.993 Lite Edition\Quartus Prime Lite Edition 23.1std.1.993`)
|
- Optional: Rename or remove the old shortcut. This depends on your installation (Mine is under `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Intel FPGA 23.1std.1.993 Lite Edition\Quartus Prime Lite Edition 23.1std.1.993`)
|
||||||
|
- RTL view: Select custom theme for dark mode colors
|
||||||
|
|
||||||
## Images
|
## Images
|
||||||
|
|
||||||
|
@ -21,6 +22,8 @@ This script automatically copies the resources and creates shortcuts to ensure e
|
||||||
|
|
||||||
![Dark mode report view image](sample2.png)
|
![Dark mode report view image](sample2.png)
|
||||||
|
|
||||||
|
![Dark mode RTL view image](sample3.png)
|
||||||
|
|
||||||
## Attribution
|
## Attribution
|
||||||
|
|
||||||
See `LICENSE.md` for
|
See `LICENSE.md` for
|
||||||
|
|
BIN
dark_icons/light/window_close.png
Normal file
After Width: | Height: | Size: 814 B |
BIN
dark_icons/light/window_close@2x.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
dark_icons/light/window_close_disabled.png
Normal file
After Width: | Height: | Size: 764 B |
BIN
dark_icons/light/window_close_disabled@2x.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
dark_icons/light/window_close_focus.png
Normal file
After Width: | Height: | Size: 716 B |
BIN
dark_icons/light/window_close_focus@2x.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
dark_icons/light/window_close_pressed.png
Normal file
After Width: | Height: | Size: 714 B |
BIN
dark_icons/light/window_close_pressed@2x.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
|
@ -37,6 +37,28 @@ QToolBar * {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* For some reason I can't set the background color of the window manager tabs
|
||||||
|
in RTL viewer, so I am just going to make it have the defualt white background
|
||||||
|
and black text */
|
||||||
|
NUIQ_MDI_AREA QTabBar::tab {
|
||||||
|
color: #19232D;
|
||||||
|
}
|
||||||
|
|
||||||
|
NUIQ_MDI_AREA QTabBar::close-button {
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 4px;
|
||||||
|
image: url(":/dark_icons/light/window_close.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
NUIQ_MDI_AREA QTabBar::close-button:hover {
|
||||||
|
image: url(":/dark_icons/light/window_close_focus.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
NUIQ_MDI_AREA QTabBar::close-button:pressed {
|
||||||
|
image: url(":/dark_icons/light/window_close_pressed.png");
|
||||||
|
}
|
||||||
|
|
||||||
/* QWidget ----------------------------------------------------------------
|
/* QWidget ----------------------------------------------------------------
|
||||||
|
|
||||||
--------------------------------------------------------------------------- */
|
--------------------------------------------------------------------------- */
|
||||||
|
|
22
install.ps1
|
@ -47,7 +47,7 @@ $WScriptShell = New-Object -ComObject WScript.Shell
|
||||||
$shortcut = $WScriptShell.CreateShortcut("$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Quartus.lnk")
|
$shortcut = $WScriptShell.CreateShortcut("$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Quartus.lnk")
|
||||||
$shortcut.TargetPath = "wscript.exe"
|
$shortcut.TargetPath = "wscript.exe"
|
||||||
$shortcut.Arguments = "`"$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Quartus.vbs`""
|
$shortcut.Arguments = "`"$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Quartus.vbs`""
|
||||||
$shortcut.WorkingDirectory = "D:\intelFPGA_lite\23.1std"
|
$shortcut.WorkingDirectory = $(Split-Path $installPath)
|
||||||
$shortcut.IconLocation = "$installPath\bin64\quartus.exe,0"
|
$shortcut.IconLocation = "$installPath\bin64\quartus.exe,0"
|
||||||
$shortcut.Save()
|
$shortcut.Save()
|
||||||
|
|
||||||
|
@ -57,7 +57,8 @@ $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
$content = Get-Content "$scriptDir\darkstyle.qss"
|
$content = Get-Content "$scriptDir\darkstyle.qss"
|
||||||
$styleWithPath = $content -replace 'url\(":/dark_icons', "url(`"$($installPath -replace '\\', '/')/ZZZ_dark_icons"
|
$styleWithPath = $content -replace 'url\(":/dark_icons', "url(`"$($installPath -replace '\\', '/')/ZZZ_dark_icons"
|
||||||
Set-Content -Path "$installPath\darkstyle.qss" -Value $styleWithPath
|
Set-Content -Path "$installPath\darkstyle.qss" -Value $styleWithPath
|
||||||
Copy-Item -Path "$scriptDir\dark_icons" -Destination "$installPath\ZZZ_dark_icons" -Recurse -Force
|
New-Item -Force -Type Directory "$installPath\ZZZ_dark_icons"
|
||||||
|
Copy-Item -Path "$scriptDir\dark_icons\*" -Destination "$installPath\ZZZ_dark_icons" -Recurse -Force
|
||||||
|
|
||||||
Write-Output "Rewrite registry entries for file association open commands"
|
Write-Output "Rewrite registry entries for file association open commands"
|
||||||
|
|
||||||
|
@ -85,13 +86,14 @@ $quartusSettingsPath = "$HOME\quartus2.qreg"
|
||||||
if (Test-Path $quartusSettingsPath) {
|
if (Test-Path $quartusSettingsPath) {
|
||||||
$suffix = 1
|
$suffix = 1
|
||||||
do {
|
do {
|
||||||
$quartusBakPath = [System.IO.Path]::ChangeExtension($quartusSettingsPath, "$suffix" + [System.IO.Path]::GetExtension($quartusSettingsPath))
|
$quartusBakPath = [System.IO.Path]::ChangeExtension($quartusSettingsPath, "$suffix" + "_backup" + [System.IO.Path]::GetExtension($quartusSettingsPath))
|
||||||
$suffix++
|
$suffix++
|
||||||
} while (Test-Path $quartusBakPath)
|
} while (Test-Path $quartusBakPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
Copy-Item -Path $quartusSettingsPath -Destination $quartusBakPath
|
Copy-Item -Path $quartusSettingsPath -Destination $quartusBakPath
|
||||||
$replacements = @{
|
$replacements = @{
|
||||||
|
# Scintilla based text editor
|
||||||
"Altera_Foundation_Class\\AFCQ_TED_KEYWORD_COLOR.+" = "Altera_Foundation_Class\AFCQ_TED_KEYWORD_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)"
|
"Altera_Foundation_Class\\AFCQ_TED_KEYWORD_COLOR.+" = "Altera_Foundation_Class\AFCQ_TED_KEYWORD_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)"
|
||||||
"Altera_Foundation_Class\\AFCQ_TED_NORMAL_COLOR.+" = "Altera_Foundation_Class\AFCQ_TED_NORMAL_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\xdf\xdf\xe1\xe1\xe2\xe2\0\0)"
|
"Altera_Foundation_Class\\AFCQ_TED_NORMAL_COLOR.+" = "Altera_Foundation_Class\AFCQ_TED_NORMAL_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\xdf\xdf\xe1\xe1\xe2\xe2\0\0)"
|
||||||
"Altera_Foundation_Class\\AFCQ_TED_BACKGROUND_COLOR.+" = "Altera_Foundation_Class\AFCQ_TED_BACKGROUND_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\x19\x19##--\0\0)"
|
"Altera_Foundation_Class\\AFCQ_TED_BACKGROUND_COLOR.+" = "Altera_Foundation_Class\AFCQ_TED_BACKGROUND_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\x19\x19##--\0\0)"
|
||||||
|
@ -109,6 +111,20 @@ $replacements = @{
|
||||||
"Altera_Foundation_Class\\AFCQ_TED_STRING_COLOR.+" = "Altera_Foundation_Class\AFCQ_TED_STRING_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\xe8\xe8\0\0\xe8\xe8\0\0)"
|
"Altera_Foundation_Class\\AFCQ_TED_STRING_COLOR.+" = "Altera_Foundation_Class\AFCQ_TED_STRING_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\xe8\xe8\0\0\xe8\xe8\0\0)"
|
||||||
"Altera_Foundation_Class\\AFCQ_TED_IDENTIFIER_COLOR.+" = "Altera_Foundation_Class\AFCQ_TED_IDENTIFIER_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\xe8\xe8\0\0\xe8\xe8\0\0)"
|
"Altera_Foundation_Class\\AFCQ_TED_IDENTIFIER_COLOR.+" = "Altera_Foundation_Class\AFCQ_TED_IDENTIFIER_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\xe8\xe8\0\0\xe8\xe8\0\0)"
|
||||||
"Altera_Foundation_Class\\AFCQ_MSW_INFO_COLOR.+=" = "Altera_Foundation_Class\AFCQ_MSW_INFO_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\0\0\xc0\xc0\0\0\0\0)"
|
"Altera_Foundation_Class\\AFCQ_MSW_INFO_COLOR.+=" = "Altera_Foundation_Class\AFCQ_MSW_INFO_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\0\0\xc0\xc0\0\0\0\0)"
|
||||||
|
|
||||||
|
# RTL viewer
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_BACKGROUND_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_BACKGROUND_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\x19\x19##--\0\0)"
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_INSTANE_FONT_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_INSTANE_FONT_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\0\0\xff\xff\0\0)"
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_RIPPER_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_RIPPER_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\0\0\xff\xff\xff\xff\0\0)"
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_NET_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_NET_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\0\0\0\0)"
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_PIN_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_PIN_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\0\0\xff\xff\xff\xff\0\0)"
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_PORT_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_PORT_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\0\0\xff\xff\xff\xff\0\0)"
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_PRIMITIVE_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_PRIMITIVE_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\x1a\x1arr\xbb\xbb\0\0)"
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_SELECTION_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_SELECTION_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\0\0\0\0\0\0)"
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_INSTANCE_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_INSTANCE_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\0\0\x80\x80\0\0\0\0)"
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_INSTANCE_REGION_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_INSTANCE_REGION_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\x37\x37\x41\x41OO\0\0)"
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_INSTANCE_ATOM_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_INSTANCE_ATOM_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\x1a\x1arr\xbb\xbb\0\0)"
|
||||||
|
"Altera_Foundation_Class\\AFCQ_NUI_ENCRYPTED_INSTANCE_COLOR.+" = "Altera_Foundation_Class\AFCQ_NUI_ENCRYPTED_INSTANCE_COLOR=@Variant(\0\0\0\x43\x1\xff\xff\x45\x45SSdd\0\0)"
|
||||||
}
|
}
|
||||||
$quartusSettings = Get-Content -Path $quartusSettingsPath -Raw
|
$quartusSettings = Get-Content -Path $quartusSettingsPath -Raw
|
||||||
foreach ($key in $replacements.Keys) {
|
foreach ($key in $replacements.Keys) {
|
||||||
|
|
BIN
sample3.png
Normal file
After Width: | Height: | Size: 157 KiB |