EU-Utility/projects/EU-Utility/core/eu_styles.py

212 lines
6.5 KiB
Python

"""
EU-Utility - EU Styling Constants
Exact styling to match Entropia Universe game UI.
Based on screenshot analysis.
"""
# EU Color Palette from screenshots - EXACT MATCH
EU_COLORS = {
# Backgrounds - from Skills window
'bg_dark': 'rgba(20, 25, 35, 245)', # Main window bg
'bg_panel': 'rgba(30, 35, 45, 230)', # Panel/content bg
'bg_header': 'rgba(25, 30, 40, 240)', # Header bg
'bg_hover': 'rgba(40, 45, 60, 200)', # Hover state
'bg_selected': 'rgba(50, 55, 75, 180)', # Selected item
# Borders
'border_subtle': 'rgba(60, 70, 90, 100)',
'border_medium': 'rgba(80, 90, 110, 120)',
'border_window': 'rgba(255, 140, 66, 200)', # Orange window border
'border_active': 'rgba(255, 140, 66, 255)', # Active/selected border
# Accents - EXACT from game
'accent_orange': '#ff8c42', # Main orange
'accent_orange_bright': '#ffa060', # Hover orange
'accent_teal': '#4ecdc4', # Progress bar teal
'accent_gold': '#ffc107',
'accent_blue': '#4a9eff',
# Text
'text_primary': 'rgba(255, 255, 255, 250)',
'text_secondary': 'rgba(255, 255, 255, 180)',
'text_muted': 'rgba(255, 255, 255, 120)',
'text_orange': '#ff8c42', # Orange text for ranks
# Progress bars
'progress_bg': 'rgba(60, 70, 90, 150)',
'progress_fill': '#4ecdc4', # Teal like game
}
# EU Border Radius - slightly rounded corners
EU_RADIUS = {
'small': '4px',
'medium': '6px',
'large': '8px',
'button': '3px',
}
# EU Font Stack
EU_FONT = '"Eurostile", "Bank Gothic", "Segoe UI", Arial, sans-serif'
# EU Style Sheets
EU_STYLES = {
'overlay_container': f"""
QWidget {{
background-color: {EU_COLORS['bg_dark']};
border: 1px solid {EU_COLORS['border_medium']};
border-radius: {EU_RADIUS['large']};
}}
""",
'panel': f"""
QWidget {{
background-color: {EU_COLORS['bg_panel']};
border: 1px solid {EU_COLORS['border_subtle']};
border-radius: {EU_RADIUS['medium']};
}}
""",
'header': f"""
QWidget {{
background-color: {EU_COLORS['bg_header']};
border-top-left-radius: {EU_RADIUS['large']};
border-top-right-radius: {EU_RADIUS['large']};
border-bottom: 1px solid {EU_COLORS['border_medium']};
}}
""",
'button_primary': f"""
QPushButton {{
background-color: rgba(255, 140, 66, 200);
color: white;
border: 1px solid rgba(255, 160, 80, 100);
border-radius: {EU_RADIUS['button']};
padding: 8px 16px;
font-weight: bold;
font-size: 12px;
}}
QPushButton:hover {{
background-color: rgba(255, 160, 80, 230);
border: 1px solid rgba(255, 180, 100, 150);
}}
QPushButton:pressed {{
background-color: rgba(230, 120, 50, 200);
}}
""",
'button_secondary': f"""
QPushButton {{
background-color: rgba(60, 70, 90, 150);
color: {EU_COLORS['text_secondary']};
border: 1px solid {EU_COLORS['border_subtle']};
border-radius: {EU_RADIUS['button']};
padding: 6px 12px;
font-size: 11px;
}}
QPushButton:hover {{
background-color: rgba(80, 90, 110, 180);
border: 1px solid {EU_COLORS['border_medium']};
}}
""",
'input': f"""
QLineEdit {{
background-color: rgba(20, 25, 35, 200);
color: {EU_COLORS['text_primary']};
border: 1px solid {EU_COLORS['border_subtle']};
border-radius: {EU_RADIUS['small']};
padding: 6px 10px;
font-size: 12px;
}}
QLineEdit:focus {{
border: 1px solid {EU_COLORS['border_orange']};
}}
""",
'table': f"""
QTableWidget {{
background-color: rgba(20, 25, 35, 150);
color: {EU_COLORS['text_primary']};
border: 1px solid {EU_COLORS['border_subtle']};
border-radius: {EU_RADIUS['medium']};
gridline-color: {EU_COLORS['border_subtle']};
}}
QTableWidget::item {{
padding: 6px;
border-bottom: 1px solid {EU_COLORS['border_subtle']};
}}
QTableWidget::item:selected {{
background-color: rgba(255, 140, 66, 100);
}}
QHeaderView::section {{
background-color: {EU_COLORS['bg_header']};
color: {EU_COLORS['text_secondary']};
padding: 8px;
border: none;
border-right: 1px solid {EU_COLORS['border_subtle']};
font-weight: bold;
font-size: 11px;
}}
""",
'progress_bar': f"""
QProgressBar {{
background-color: {EU_COLORS['progress_bg']};
border: none;
border-radius: 2px;
height: 4px;
text-align: center;
}}
QProgressBar::chunk {{
background-color: {EU_COLORS['progress_fill']};
border-radius: 2px;
}}
""",
'tab': f"""
QTabBar::tab {{
background-color: rgba(35, 40, 55, 200);
color: {EU_COLORS['text_muted']};
padding: 10px 20px;
border-top-left-radius: {EU_RADIUS['medium']};
border-top-right-radius: {EU_RADIUS['medium']};
margin-right: 2px;
font-size: 11px;
}}
QTabBar::tab:selected {{
background-color: {EU_COLORS['accent_orange']};
color: white;
font-weight: bold;
}}
QTabBar::tab:hover:!selected {{
background-color: rgba(45, 50, 70, 240);
color: {EU_COLORS['text_secondary']};
}}
""",
'floating_icon': f"""
QLabel {{
background-color: {EU_COLORS['bg_panel']};
border: 1px solid {EU_COLORS['border_orange']};
border-radius: {EU_RADIUS['small']};
}}
""",
'floating_icon_hover': f"""
QLabel {{
background-color: {EU_COLORS['bg_hover']};
border: 1px solid {EU_COLORS['accent_orange']};
border-radius: {EU_RADIUS['small']};
}}
""",
}
def get_eu_style(style_name):
"""Get an EU style by name."""
return EU_STYLES.get(style_name, "")
def get_color(name):
"""Get an EU color by name."""
return EU_COLORS.get(name, "white")