Overview
angr Management supports comprehensive theming through Qt StyleSheets (CSS-like syntax) and a color configuration system. Themes control the appearance of all UI elements including windows, docks, menus, and custom widgets.Theme Structure
Themes are located inangrmanagement/resources/themes/ with the following structure:
Built-in Themes
Available Themes
- Light - Default light theme
- Dark - Dark theme with improved contrast
- Dracula - Popular dark theme
- Catppuccin Mocha - Warm, pastel dark theme
Switching Themes
Themes can be changed through Preferences or configuration:Base Stylesheet
Thebase.css file defines common styles used by all themes:
Widget Styles
Block Styles
Dock Widget Styles
angr Management uses Qt Advanced Docking System (QtAds):Auto-Hide Sidebar
Buttons and Icons
Creating Custom Themes
1. Create Theme Directory
2. Create theme.css
Create~/.local/share/angr-management/themes/MyTheme/theme.css:
3. Add Theme Icons
Copy or create SVG icons:4. Reference Theme Icons
Use the$theme variable to reference icon paths:
Color Configuration
Colors can be configured programmatically through the configuration system.Accessing Colors
Common Color Configuration Options
Defining Custom Colors
Colors can be set in configuration files or code:Color Schemes
Color schemes are defined inangrmanagement/config/color_schemes.py:
Font Configuration
Disassembly Font
Font Parsing
Fonts are stored in configuration as strings:Theme-Specific Customization
Dark Theme Example
FromDark/theme.css:
Light Theme Example
FromLight/theme.css:
Applying Themes to Custom Widgets
Using Style Classes
Programmatic Styling
Responding to Theme Changes
Advanced Theming
Custom Drawing with Theme Colors
Palette-Based Styling
Qt palettes work with theme CSS:window- Main backgroundwindowText- Main textbase- Input backgroundtext- Input textbutton- Button backgroundbuttonText- Button texthighlight- Selection backgroundhighlightedText- Selection textmid,dark,shadow- Shading
Configuration File Format
Theme settings in~/.config/angr-management/config.toml:
AARRGGBB (alpha, red, green, blue in hex)
Best Practices
1. Use Configuration Colors
Always useConf colors instead of hardcoding:
2. Test in Multiple Themes
Test custom widgets in Light and Dark themes:3. Use Relative Colors
For derived colors, use relative adjustments:4. Respect User Preferences
Don’t override user theme choices without permission:Troubleshooting
Theme Not Loading
- Check theme directory exists
- Verify
theme.cssis valid CSS - Check console for errors
- Ensure icon paths are correct
Colors Not Updating
- Call
self.update()after color changes - Check if widget caches colors
- Verify color is from
Conf, not hardcoded
Icons Not Displaying
- Check
$theme/images/path - Verify SVG files exist
- Check file permissions
- Use absolute paths for debugging
Next Steps
- Learn about UI Components
- Create custom Views and Widgets
- Explore Plugin Development