ui: Clean up PlatformTitlebar
implementation (#9413)
This PR cleans up the implementation of the `PlatformTitlebar` component to better match our conventions for building UI components. Release Notes: - N/A
This commit is contained in:
parent
db43479be8
commit
123d3ee282
5 changed files with 159 additions and 123 deletions
|
@ -13,8 +13,8 @@ use rpc::proto;
|
|||
use std::sync::Arc;
|
||||
use theme::ActiveTheme;
|
||||
use ui::{
|
||||
h_flex, platform_titlebar, popover_menu, prelude::*, Avatar, AvatarAudioStatusIndicator,
|
||||
Button, ButtonLike, ButtonStyle, ContextMenu, Icon, IconButton, IconName, TintColor, Tooltip,
|
||||
h_flex, popover_menu, prelude::*, Avatar, AvatarAudioStatusIndicator, Button, ButtonLike,
|
||||
ButtonStyle, ContextMenu, Icon, IconButton, IconName, PlatformTitlebar, TintColor, Tooltip,
|
||||
};
|
||||
use util::ResultExt;
|
||||
use vcs_menu::{build_branch_list, BranchList, OpenRecent as ToggleVcsMenu};
|
||||
|
@ -58,8 +58,8 @@ impl Render for CollabTitlebarItem {
|
|||
let project_id = self.project.read(cx).remote_id();
|
||||
let workspace = self.workspace.upgrade();
|
||||
|
||||
platform_titlebar("collab-titlebar")
|
||||
.titlebar_bg(cx.theme().colors().title_bar_background)
|
||||
PlatformTitlebar::new("collab-titlebar")
|
||||
.background(cx.theme().colors().title_bar_background)
|
||||
// note: on windows titlebar behaviour is handled by the platform implementation
|
||||
.when(cfg!(not(windows)), |this| {
|
||||
this.on_click(|event, cx| {
|
||||
|
@ -68,7 +68,6 @@ impl Render for CollabTitlebarItem {
|
|||
}
|
||||
})
|
||||
})
|
||||
.justify_between()
|
||||
// left side
|
||||
.child(
|
||||
h_flex()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue