Changed context menu highlight color from purple pink to blue.
This commit is contained in:
parent
f21c5f9646
commit
e736622213
29
borealis.py
29
borealis.py
@ -196,7 +196,6 @@ if __name__ == "__main__":
|
||||
for node_class in node_classes:
|
||||
node_type = f"{node_class.__identifier__}.{node_class.__name__}"
|
||||
node_name = node_class.NODE_NAME
|
||||
# Remove "Create:" prefix - use only the node name
|
||||
category_menu.add_command(
|
||||
node_name,
|
||||
make_node_command(graph, node_type)
|
||||
@ -214,6 +213,34 @@ if __name__ == "__main__":
|
||||
workflow_menu.add_command("Save Workflow", lambda: save_workflow(graph))
|
||||
workflow_menu.add_command("Close Workflow", lambda: close_workflow(graph))
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Custom stylesheet to control highlight color & overall QMenu look:
|
||||
# ------------------------------------------------------------------
|
||||
menu_stylesheet = """
|
||||
QMenu {
|
||||
background-color: rgb(30, 30, 30);
|
||||
border: 1px solid rgba(200, 200, 200, 60);
|
||||
}
|
||||
QMenu::item {
|
||||
padding: 5px 18px 2px;
|
||||
background-color: transparent;
|
||||
}
|
||||
QMenu::item:selected {
|
||||
color: rgb(255, 255, 255);
|
||||
background-color: rgb(60, 120, 180); /* set your highlight color here */
|
||||
}
|
||||
QMenu::separator {
|
||||
height: 1px;
|
||||
background: rgba(255,255,255,20);
|
||||
margin: 4px 8px;
|
||||
}
|
||||
"""
|
||||
# Apply to each top-level menu. Submenus inherit from the parent menu.
|
||||
graph_context_menu.qmenu.setStyleSheet(menu_stylesheet)
|
||||
add_nodes_menu.qmenu.setStyleSheet(menu_stylesheet)
|
||||
workflow_menu.qmenu.setStyleSheet(menu_stylesheet)
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
# Grid styling changes
|
||||
graph.set_background_color(20, 20, 20) # Dark gray
|
||||
graph.set_grid_color(60, 60, 60) # Gray grid lines
|
||||
|
Loading…
x
Reference in New Issue
Block a user