From 8a7565e04b7d09a72f30794022cfefea9237aa29 Mon Sep 17 00:00:00 2001
From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Date: Tue, 18 Feb 2025 13:24:06 -0300
Subject: [PATCH] Add small improvement to the theme picker footer (#25088)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Always start a button's label with an imperative verb
- Use the `ArrowUpRight` icon when the button opens an external link
Release Notes:
- N/A
---
crates/theme_selector/src/theme_selector.rs | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/crates/theme_selector/src/theme_selector.rs b/crates/theme_selector/src/theme_selector.rs
index aaca1b0210..d64591707c 100644
--- a/crates/theme_selector/src/theme_selector.rs
+++ b/crates/theme_selector/src/theme_selector.rs
@@ -330,17 +330,22 @@ impl PickerDelegate for ThemeSelectorDelegate {
) -> Option {
Some(
h_flex()
- .w_full()
.p_2()
+ .w_full()
+ .justify_between()
.gap_2()
.border_t_1()
.border_color(cx.theme().colors().border_variant)
.child(
- Button::new("docs", "Theme Docs").on_click(cx.listener(|_, _, _, cx| {
- cx.open_url("https://zed.dev/docs/themes");
- })),
+ Button::new("docs", "View Theme Docs")
+ .icon(IconName::ArrowUpRight)
+ .icon_position(IconPosition::End)
+ .icon_size(IconSize::XSmall)
+ .icon_color(Color::Muted)
+ .on_click(cx.listener(|_, _, _, cx| {
+ cx.open_url("https://zed.dev/docs/themes");
+ })),
)
- .child(div().flex_grow())
.child(
Button::new("more-themes", "Install Themes").on_click(cx.listener({
move |_, _, window, cx| {