Allow configuring spacing of project panel entries (#16255)
Release Notes:
- Added `project_panel.entry_spacing` setting to configure spacing
between entries in the project panel.
### Comfortable (default)
```json
"project_panel": {
"entry_spacing": "comfortable",
```
<img width="1582" alt="Screenshot 2024-08-14 at 5 50 41 PM"
src="https://github.com/user-attachments/assets/3411a82e-7517-4095-bf4a-bbf40000a7cb">
### Standard
```json
"project_panel": {
"entry_spacing": "standard",
```
<img width="1582" alt="Screenshot 2024-08-14 at 5 50 54 PM"
src="https://github.com/user-attachments/assets/2c13d799-c405-4301-8214-1cb3cc641c92">
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
co-authored by
Marshall Bowers
parent
35d3d29bcf
commit
9ea7ed8e0a
@@ -11,6 +11,7 @@ use crate::{prelude::*, Disclosure};
|
||||
pub enum ListItemSpacing {
|
||||
#[default]
|
||||
Dense,
|
||||
ExtraDense,
|
||||
Sparse,
|
||||
}
|
||||
|
||||
@@ -219,6 +220,7 @@ impl RenderOnce for ListItem {
|
||||
.px(DynamicSpacing::Base06.rems(cx))
|
||||
.map(|this| match self.spacing {
|
||||
ListItemSpacing::Dense => this,
|
||||
ListItemSpacing::ExtraDense => this.py_neg_px(),
|
||||
ListItemSpacing::Sparse => this.py_1(),
|
||||
})
|
||||
.when(self.inset && !self.disabled, |this| {
|
||||
|
||||
Reference in New Issue
Block a user