File tree Expand file tree Collapse file tree 16 files changed +17
-17
lines changed Expand file tree Collapse file tree 16 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ edition = "2021"
5
5
6
6
7
7
[dependencies ]
8
- gtk = { version = " *" , package = " gtk4" , features = [" v4_8 " ] }
8
+ gtk = { version = " *" , package = " gtk4" , features = [" v4_12 " ] }
9
9
adw = { version = " >= 0.3.1" , package = " libadwaita" , features = [" v1_2" ] }
10
10
once_cell = " 1.0"
11
11
serde = { version = " 1.0" , features = [" derive" ] }
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ fn main() -> glib::ExitCode {
20
20
fn load_css ( ) {
21
21
// Load the CSS file and add it to the provider
22
22
let provider = CssProvider :: new ( ) ;
23
- provider. load_from_data ( include_str ! ( "style.css" ) ) ;
23
+ provider. load_from_string ( include_str ! ( "style.css" ) ) ;
24
24
25
25
// Add the provider to the default screen
26
26
gtk:: style_context_add_provider_for_display (
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ fn main() -> glib::ExitCode {
19
19
fn load_css ( ) {
20
20
// Load the CSS file and add it to the provider
21
21
let provider = CssProvider :: new ( ) ;
22
- provider. load_from_data ( include_str ! ( "style.css" ) ) ;
22
+ provider. load_from_string ( include_str ! ( "style.css" ) ) ;
23
23
24
24
// Add the provider to the default screen
25
25
gtk:: style_context_add_provider_for_display (
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ fn main() -> glib::ExitCode {
19
19
fn load_css ( ) {
20
20
// Load the CSS file and add it to the provider
21
21
let provider = CssProvider :: new ( ) ;
22
- provider. load_from_data ( include_str ! ( "style.css" ) ) ;
22
+ provider. load_from_string ( include_str ! ( "style.css" ) ) ;
23
23
24
24
// Add the provider to the default screen
25
25
gtk:: style_context_add_provider_for_display (
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ fn main() -> glib::ExitCode {
19
19
fn load_css ( ) {
20
20
// Load the CSS file and add it to the provider
21
21
let provider = CssProvider :: new ( ) ;
22
- provider. load_from_data ( include_str ! ( "style.css" ) ) ;
22
+ provider. load_from_string ( include_str ! ( "style.css" ) ) ;
23
23
24
24
// Add the provider to the default screen
25
25
gtk:: style_context_add_provider_for_display (
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ fn main() -> glib::ExitCode {
23
23
fn load_css ( ) {
24
24
// Load the CSS file and add it to the provider
25
25
let provider = CssProvider :: new ( ) ;
26
- provider. load_from_data ( include_str ! ( "style.css" ) ) ;
26
+ provider. load_from_string ( include_str ! ( "style.css" ) ) ;
27
27
28
28
// Add the provider to the default screen
29
29
gtk:: style_context_add_provider_for_display (
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ fn main() -> glib::ExitCode {
23
23
fn load_css ( ) {
24
24
// Load the CSS file and add it to the provider
25
25
let provider = CssProvider :: new ( ) ;
26
- provider. load_from_data ( include_str ! ( "style.css" ) ) ;
26
+ provider. load_from_string ( include_str ! ( "style.css" ) ) ;
27
27
28
28
// Add the provider to the default screen
29
29
gtk:: style_context_add_provider_for_display (
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ fn main() -> glib::ExitCode {
23
23
fn load_css ( ) {
24
24
// Load the CSS file and add it to the provider
25
25
let provider = CssProvider :: new ( ) ;
26
- provider. load_from_data ( include_str ! ( "style.css" ) ) ;
26
+ provider. load_from_string ( include_str ! ( "style.css" ) ) ;
27
27
28
28
// Add the provider to the default screen
29
29
gtk:: style_context_add_provider_for_display (
Original file line number Diff line number Diff line change @@ -33,5 +33,5 @@ fn setup_shortcuts(app: &Application) {
33
33
fn build_ui ( app : & Application ) {
34
34
// Create a new custom window and show it
35
35
let window = Window :: new ( app) ;
36
- window. show ( ) ;
36
+ window. present ( ) ;
37
37
}
Original file line number Diff line number Diff line change @@ -37,6 +37,6 @@ fn setup_shortcuts(app: &adw::Application) {
37
37
fn build_ui ( app : & adw:: Application ) {
38
38
// Create a new custom window and show it
39
39
let window = Window :: new ( app) ;
40
- window. show ( ) ;
40
+ window. present ( ) ;
41
41
}
42
42
// ANCHOR_END: main
You can’t perform that action at this time.
0 commit comments