graphview: draw the background grid via CSS instead of manually with cairo

This makes gtk draw the background grid for us via CSS, instead of manually drawing each line via cairo.

This improves performance, as the grid may now be drawn via GPU, and gets rid of the custom drawing code we had.
This commit is contained in:
Tom A. Wagner
2022-05-03 14:04:54 +02:00
parent 52e48cc0a7
commit df72a68815
2 changed files with 5 additions and 24 deletions

View File

@@ -18,6 +18,7 @@
@define-color audio rgb(50,100,240);
@define-color video rgb(200,200,0);
@define-color midi rgb(200,0,50);
@define-color graphview-grid rgb(35,35,35);
@define-color graphview-link #808080;
.audio {
@@ -36,5 +37,8 @@
}
graphview {
background: @text_view_bg;
background-image: linear-gradient(@graphview-grid 1px, transparent 1px),
linear-gradient(to right, @graphview-grid 1px, transparent 1px);
background-size: 20px 20px;
background-color: @text_view_bg;
}