Skip to content

Commit 843f8e9

Browse files
authored
Update main.rs
1 parent 214d1f4 commit 843f8e9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

source-code/src/main.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ fn main() {
2626
.title("HackerOS Welcome")
2727
.default_width(1000)
2828
.default_height(750)
29+
.decorated(false) // Use false for client-side decorations (CSD) with custom header bar
2930
.build();
3031

31-
// Load CSS
32+
// Load CSS with improvements for prettier look
3233
let provider = CssProvider::new();
3334
provider.load_from_data("
3435
window {
@@ -37,6 +38,11 @@ fn main() {
3738
border-radius: 12px;
3839
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
3940
}
41+
headerbar {
42+
background-color: #1E1E1E;
43+
border-bottom: 1px solid #333;
44+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
45+
}
4046
label {
4147
color: white;
4248
text-shadow: 1px 1px 2px black;
@@ -85,6 +91,9 @@ fn main() {
8591
background-color: #0A0A0A;
8692
border-top: 1px solid #333;
8793
}
94+
image {
95+
color: #FFFFFF; /* For symbolic icons */
96+
}
8897
");
8998

9099
gtk::style_context_add_provider_for_display(
@@ -95,6 +104,7 @@ fn main() {
95104

96105
let actions = Rc::new(RefCell::new(Actions::new()));
97106
build_ui(&window, actions.clone());
107+
98108
window.present();
99109
});
100110

0 commit comments

Comments
 (0)