Skip to content

Commit

Permalink
Use 'my_custom_class" for the programmaticaly set style (#214)
Browse files Browse the repository at this point in the history
The "my_custom_class" style was unused, but was meant to style the last label
  • Loading branch information
UrtsiSantsi authored and sonnyp committed Nov 1, 2024
1 parent c4ee997 commit 6b86bd9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Styling with CSS/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ use gtk::prelude::*;

pub fn main() {
let basic_label: gtk::Label = workbench::builder().object("basic_label").unwrap();
basic_label.add_css_class("css_text");
basic_label.add_css_class("my_custom_class");
}
2 changes: 1 addition & 1 deletion src/Styling with CSS/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const basic_label = workbench.builder.get_object("basic_label");

basic_label.add_css_class("css_text");
basic_label.add_css_class("my_custom_class");
2 changes: 1 addition & 1 deletion src/Styling with CSS/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

basic_label: Gtk.Label = workbench.builder.get_object("basic_label")

basic_label.add_css_class("css_text")
basic_label.add_css_class("my_custom_class")
2 changes: 1 addition & 1 deletion src/Styling with CSS/main.vala
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

public void main () {
var basic_label = (Gtk.Label) workbench.builder.get_object ("basic_label");
basic_label.add_css_class ("css_text");
basic_label.add_css_class ("my_custom_class");
}

0 comments on commit 6b86bd9

Please sign in to comment.