graphview: update css for node and port

Change border style and
port presence entries
This commit is contained in:
Stéphane Cerveau 2022-01-18 17:17:36 +01:00
parent 0f0f9d6fc0
commit ade3f14902
3 changed files with 21 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 123 KiB

View file

@ -3,6 +3,10 @@
button.node {
color: rgb(0, 0, 255);
background: rgb(170, 255, 170);
border-width: 2px;
border-style: solid;
border-radius: 10px;
border-color: rgb(0, 0, 0);
}
button.node-selected {
@ -12,6 +16,10 @@ button.node-selected {
button.port {
color: rgb(0, 0, 255);
border-width: 2px;
border-style: solid;
border-radius: 10px;
border-color: rgb(0, 0, 0);
}
button.port-selected {
@ -26,6 +34,14 @@ button.port-in {
background: rgb(170, 170, 255);
}
button.port-sometimes {
border-style: dashed;
}
button.port-always {
border-style: solid;
}
graphview {
background: #d0d2d4;
}

View file

@ -140,6 +140,11 @@ impl Port {
.presence
.set(presence)
.expect("Port presence already set");
if presence == PortPresence::Always {
port.add_css_class("port-always");
} else {
port.add_css_class("port-sometimes");
}
let label = gtk::Label::new(Some(name));
label.set_parent(&port);