feat(ui): add selected icon to combobox and refine styling
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
Rust / build (macos-latest, stable) (pull_request) Waiting to run
Rust / build (ubuntu-latest, stable) (pull_request) Waiting to run
Rust / build (windows-latest, stable) (pull_request) Waiting to run
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
Rust / build (macos-latest, stable) (pull_request) Waiting to run
Rust / build (ubuntu-latest, stable) (pull_request) Waiting to run
Rust / build (windows-latest, stable) (pull_request) Waiting to run
This commit is contained in:
@@ -322,7 +322,10 @@ impl Render for DiffPane {
|
||||
Resizable::new("commit-diff-split", self.split.clone())
|
||||
.axis(Axis::Horizontal)
|
||||
.pane_with_min(tree, px(120.))
|
||||
.pane_with_min(detail, px(240.)),
|
||||
.pane_with_min(detail, px(240.))
|
||||
.flex_1()
|
||||
.min_w_0()
|
||||
.h_full(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use gpui::{App, AppContext as _, Entity, SharedString, WeakEntity, Window};
|
||||
use ui::combobox::{Combobox, ComboboxState};
|
||||
use ui::icons::{IconRole, icon};
|
||||
|
||||
use super::RepoDetailView;
|
||||
use super::helpers::sync_selector;
|
||||
@@ -19,6 +20,7 @@ impl RefSwitcher {
|
||||
ComboboxState::new(
|
||||
Combobox::new("branch-select", "Branch", Vec::new())
|
||||
.placeholder("Branch")
|
||||
.selected_icon(icon(IconRole::GitBranch))
|
||||
.on_change(move |value, window, cx| {
|
||||
if let Some(name) = value
|
||||
&& let Err(error) = branch_view.update(cx, |this, cx| {
|
||||
|
||||
Reference in New Issue
Block a user