b479d1ef49120c5b7d8a319d918ac18c398d1d3b
## 🎯 Description Adds configurable window control buttons (minimize, maximize, close) positioning for Linux, allowing users to choose between macOS-style (left side) or Windows-style (right side) placement. ## ✨ Features - New `title_bar.window_controls_position` setting with `"left"` and `"right"` options - Left positioning: macOS style (Close → Minimize → Maximize) - Right positioning: Windows style (Minimize → Maximize → Close) - Fixed transparent background issues for window controls - Maintains consistent styling with Zed's theme ## 🔧 Technical Changes ### Settings System - Added `WindowControlsPosition` enum in `settings_content.rs` - Extended `TitleBarSettingsContent` with `window_controls_position` field - Updated `TitleBarSettings` to include the new configuration ### Title Bar Layout - Modified `platform_title_bar.rs` to use setting for layout positioning - Added conditional logic for `justify_start()` vs `justify_between()` based on position - Fixed transparent container background by adding `bg(titlebar_color)` ### Window Controls - Updated `platform_linux.rs` to reorder buttons based on position setting - Changed button background from `ghost_element_background` to `title_bar_background` - Implemented proper button sequencing for both positions ## 🧪 How to Test 1. Add to your Zed settings: ```json { "title_bar": { "window_controls_position": "left" } } ``` or ```json { "title_bar": { "window_controls_position": "right" } } ``` 2. Restart Zed 3. Verify buttons are positioned correctly 4. Check that background is not transparent 5. Test button functionality (minimize, maximize, close) ## �� Expected Behavior - **Left position**: Buttons appear on the left side of the title bar in Close → Minimize → Maximize order - **Right position**: Buttons appear on the right side of the title bar in Minimize → Maximize → Close order - **Background**: Solid background matching Zed's theme (no transparency) ## 🔍 Files Changed - `crates/settings/src/settings_content.rs` - Added enum and setting - `crates/title_bar/src/title_bar_settings.rs` - Updated settings struct - `crates/title_bar/src/platform_title_bar.rs` - Modified layout logic - `crates/title_bar/src/platforms/platform_linux.rs` - Updated button ordering and styling ## 🎨 Design Rationale This feature provides Linux users with the flexibility to choose their preferred window control button layout, improving the user experience by allowing them to match their desktop environment's conventions or personal preferences. ## ✅ Checklist - [x] Code compiles without errors - [x] Settings are properly serialized/deserialized - [x] Background transparency issues resolved - [x] Button ordering works correctly for both positions - [x] Layout adapts properly based on configuration - [x] No breaking changes to existing functionality ## 🔗 Related This addresses the need for customizable window control positioning on Linux, providing consistency with user expectations from different desktop environments. 
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
GPUI – Community Edition maintained by Oak Team
https://gpui-ce.github.io/
258 MiB
Languages
Rust
95.6%
WGSL
1.2%
Metal
1.1%
HLSL
1.1%
Python
0.6%
Other
0.3%