ui: optimize connections colors
This commit is contained in:
parent
b32b226c77
commit
417e8a28cb
2 changed files with 4 additions and 5 deletions
|
@ -117,8 +117,7 @@ impl ConnectionsContent {
|
||||||
let mut rect = ui.available_rect_before_wrap();
|
let mut rect = ui.available_rect_before_wrap();
|
||||||
rect.set_height(78.0);
|
rect.set_height(78.0);
|
||||||
let rounding = View::item_rounding(0, 1, false);
|
let rounding = View::item_rounding(0, 1, false);
|
||||||
let bg_color = Colors::FILL_DARK;
|
ui.painter().rect(rect, rounding, Colors::FILL, View::ITEM_STROKE);
|
||||||
ui.painter().rect(rect, rounding, bg_color, View::HOVER_STROKE);
|
|
||||||
|
|
||||||
ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| {
|
ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| {
|
||||||
// Setup padding for item buttons.
|
// Setup padding for item buttons.
|
||||||
|
@ -189,7 +188,7 @@ impl ConnectionsContent {
|
||||||
// Draw round background.
|
// Draw round background.
|
||||||
let bg_rect = rect.clone();
|
let bg_rect = rect.clone();
|
||||||
let item_rounding = View::item_rounding(index, len, false);
|
let item_rounding = View::item_rounding(index, len, false);
|
||||||
ui.painter().rect(bg_rect, item_rounding, Colors::FILL_DARK, View::ITEM_STROKE);
|
ui.painter().rect(bg_rect, item_rounding, Colors::FILL, View::ITEM_STROKE);
|
||||||
|
|
||||||
ui.vertical(|ui| {
|
ui.vertical(|ui| {
|
||||||
ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| {
|
ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| {
|
||||||
|
@ -222,7 +221,7 @@ impl ConnectionsContent {
|
||||||
// Draw connections URL.
|
// Draw connections URL.
|
||||||
ui.add_space(4.0);
|
ui.add_space(4.0);
|
||||||
let conn_text = format!("{} {}", COMPUTER_TOWER, conn.url);
|
let conn_text = format!("{} {}", COMPUTER_TOWER, conn.url);
|
||||||
View::ellipsize_text(ui, conn_text, 15.0, Colors::TEXT);
|
View::ellipsize_text(ui, conn_text, 15.0, Colors::TITLE);
|
||||||
ui.add_space(1.0);
|
ui.add_space(1.0);
|
||||||
|
|
||||||
// Setup connection status text.
|
// Setup connection status text.
|
|
@ -83,7 +83,7 @@ impl NetworkContent {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
fill: if show_connections {
|
fill: if show_connections {
|
||||||
Colors::FILL
|
Colors::BUTTON
|
||||||
} else {
|
} else {
|
||||||
Colors::WHITE
|
Colors::WHITE
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue