Skip to content

Commit

Permalink
chore: Some devtools UI adjustements
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Oct 7, 2024
1 parent 896b695 commit 43f3ba8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 30 deletions.
45 changes: 16 additions & 29 deletions crates/devtools/src/property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ pub fn Property(name: String, value: String) -> Element {
rsx!(
rect {
overflow: "clip",
height: "30",
width: "100%",
direction: "horizontal",
padding: "10",
paragraph {
width: "100%",
text {
Expand All @@ -43,25 +41,22 @@ pub fn Property(name: String, value: String) -> Element {
#[component]
pub fn GradientProperty(name: String, fill: Fill) -> Element {
rsx!(
rect {
padding: "5 10",
paragraph {
line_height: "1.9",
text {
font_size: "15",
color: "rgb(71, 180, 240)",
"{name}"
}
text {
font_size: "15",
color: "rgb(215, 215, 215)",
": "
}
text {
font_size: "15",
color: "rgb(252,181,172)",
"{fill}",
}
paragraph {
line_height: "1.9",
text {
font_size: "15",
color: "rgb(71, 180, 240)",
"{name}"
}
text {
font_size: "15",
color: "rgb(215, 215, 215)",
": "
}
text {
font_size: "15",
color: "rgb(252,181,172)",
"{fill}",
}
}
)
Expand All @@ -73,10 +68,8 @@ pub fn ColorProperty(name: String, fill: Fill) -> Element {
rsx!(
rect {
overflow: "clip",
height: "30",
width: "100%",
direction: "horizontal",
padding: "10",
label {
font_size: "15",
color: "rgb(71, 180, 240)",
Expand Down Expand Up @@ -121,10 +114,8 @@ pub fn ShadowProperty(name: String, shadow: Shadow) -> Element {
rsx!(
rect {
overflow: "clip",
height: "30",
width: "100%",
direction: "horizontal",
padding: "10",
paragraph {
text {
font_size: "15",
Expand Down Expand Up @@ -177,10 +168,8 @@ pub fn BorderProperty(name: String, border: Border) -> Element {
rsx!(
rect {
overflow: "clip",
height: "30",
width: "100%",
direction: "horizontal",
padding: "10",
paragraph {
text {
font_size: "15",
Expand Down Expand Up @@ -233,10 +222,8 @@ pub fn TextShadowProperty(name: String, text_shadow: TextShadow) -> Element {
rsx!(
rect {
overflow: "clip",
height: "30",
width: "100%",
direction: "horizontal",
padding: "10",
paragraph {
text {
font_size: "15",
Expand Down
4 changes: 3 additions & 1 deletion crates/devtools/src/tabs/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ pub fn NodeInspectorStyle(node_id: String) -> Element {
rsx!(
ScrollView {
show_scrollbar: true,
height : "calc(100% - 35)",
height : "fill",
width: "100%",
spacing: "6",
padding: "8 16",
{node.state.attributes().into_iter().enumerate().map(|(i, (name, attr))| {
match attr {
AttributeType::Measure(measure) => {
Expand Down

0 comments on commit 43f3ba8

Please sign in to comment.