Skip to content

Commit

Permalink
Padding fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
crschnick committed Nov 15, 2023
1 parent b91eb0f commit 63ab4cf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
import io.xpipe.app.fxcomps.util.BindingsHelper;
import io.xpipe.app.fxcomps.util.SimpleChangeListener;
import io.xpipe.app.util.ThreadHelper;
import io.xpipe.core.process.OsType;
import javafx.beans.binding.Bindings;
import javafx.beans.property.Property;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.Label;
import javafx.scene.control.MenuButton;
Expand Down Expand Up @@ -94,7 +96,15 @@ private Region createGroupListFilter() {
hbox.setSpacing(8);
hbox.setAlignment(Pos.CENTER);
HBox.setHgrow(f, Priority.ALWAYS);

f.getStyleClass().add("filter-bar");
if (OsType.getLocal().equals(OsType.MACOS)) {
f.setPadding(new Insets(0));
} else {
f.setPadding(new Insets(-3, 0, -3, 0));
}


AppFont.medium(hbox);
return hbox;
}
Expand All @@ -107,6 +117,13 @@ private Region createButtons() {
StoreCreationMenu.addButtons(menu);
menu.setOpacity(0.85);
menu.setMinWidth(Region.USE_PREF_SIZE);

if (OsType.getLocal().equals(OsType.MACOS)) {
menu.setPadding(new Insets(0));
} else {
menu.setPadding(new Insets(-3, 0, -3, 0));
}

return menu;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
-fx-background-radius: 3px;
-fx-border-radius: 3px;
-fx-border-width: 1px;
-fx-padding: -3 0 -3 0;
-fx-background-color: linear-gradient(from 100% 0% to 0% 100% , rgb(208, 220, 252) 40%, rgba(219, 219, 255, 1) 50%, rgb(250, 242, 242) 100%);
-fx-border-color: transparent;
}
Expand Down Expand Up @@ -166,7 +165,6 @@
}

.bar .filter-bar {
-fx-padding: -3 0 -3 0;
-fx-background-radius: 3px;
-fx-background-color: -color-bg-default;
-fx-border-color: -color-fg-default;
Expand Down

0 comments on commit 63ab4cf

Please sign in to comment.