Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make non-collapsible titledpanes not highlight on mouseover #1517

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public DensityMapDialog(QuPathGUI qupath) {
var titledPaneParams = new TitledPane("Create density map", paneParams);
titledPaneParams.setExpanded(true);
titledPaneParams.setCollapsible(false);
titledPaneParams.getStyleClass().add("uncollapsible-titled-pane");
FXUtils.simplifyTitledPane(titledPaneParams, true);

var paneDisplay = buildDisplayPane(colorModelBuilder);
Expand Down Expand Up @@ -252,6 +253,7 @@ private Pane buildAllObjectsPane(ObservableDensityMapBuilder params) {
params.densityType.bind(comboDensityType.getSelectionModel().selectedItemProperty());

var pane = createGridPane();
pane.setPadding(Insets.EMPTY);
int row = 0;

var labelObjects = createTitleLabel("Choose all objects to include");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ private void addTabsForPanes() {


TitledPane titledLog = new TitledPane(titleHistory.get(), workflowLogView.getPane());
titledLog.getStyleClass().add("uncollapsible-titled-pane");
titledLog.textProperty().bind(titleHistory);
titledLog.setCollapsible(false);
titledLog.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ Node initializePrefsManager() {

TitledPane titledPane = new TitledPane("Presets", pane);
titledPane.setCollapsible(false);
titledPane.getStyleClass().add("uncollapsible-titled-pane");
return titledPane;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ private synchronized void initializePane() {
return "Measurements (" + measurementList.size() + ")";
}, measurementList));
titledMeasurements.setCollapsible(false);
titledMeasurements.getStyleClass().add("uncollapsible-titled-pane");
titledMeasurements.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);

TextField tfFilter = new TextField();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ static List<ProjectImageEntry<BufferedImage>> promptToImportImages(QuPathGUI qup

TitledPane paneList = new TitledPane("Image paths", listView);
paneList.setCollapsible(false);


paneList.getStyleClass().add("uncollapsible-titled-pane");
BorderPane paneImages = new BorderPane();

class BuilderListCell extends ListCell<ImageServerBuilder<BufferedImage>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ public ImageDetailsPane(final ObservableValue<ImageData<BufferedImage>> imageDat
mdPane.setMasterNode(new StackPane(table));
var titlePaneAssociated = new TitledPane("Associated images", listAssociatedImages);
titlePaneAssociated.setCollapsible(false);
titlePaneAssociated.getStyleClass().add("uncollapsible-titled-pane");
listAssociatedImages.setTooltip(new Tooltip(
"Extra images associated with the current image, e.g. a label or thumbnail"));
mdPane.setDetailNode(titlePaneAssociated);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ public ProjectBrowser(final QuPathGUI qupath) {
});

TitledPane titledTree = new TitledPane("Image list", mdTree);
titledTree.getStyleClass().add("uncollapsible-titled-pane");
titledTree.setCollapsible(false);
titledTree.setMaxHeight(Double.MAX_VALUE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ private void createDialog() {
titledScripts.prefWidthProperty().bind(panelList.widthProperty());
titledScripts.prefHeightProperty().bind(panelList.heightProperty());
titledScripts.setCollapsible(false);
titledScripts.getStyleClass().add("uncollapsible-titled-pane");
panelList.setCenter(titledScripts);
listScripts.getSelectionModel().selectedItemProperty().addListener((v, o, n) -> updateSelectedScript(true));
listScripts.setCellFactory(new Callback<>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,7 @@ private Pane getCustomizeTablePane() {

TitledPane tpMetadata = new TitledPane("Metadata filter", paneMetadata);
tpMetadata.setExpanded(false);
// tpMetadata.getStyleClass().add("uncollapsible-titled-pane");
// tpMetadata.setCollapsible(false);
Tooltip tooltipMetadata = new Tooltip("Enter text to filter entries according to a selected metadata column");
Tooltip.install(paneMetadata, tooltipMetadata);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ public ViewTrackerControlPane(final QuPathGUI qupath) {
titledPane.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
titledPane.setOnMouseClicked(mouseEvent -> titledPane.setExpanded(!recordingMode.getValue()));
titledPane.setPrefWidth(250);
titledPane.getStyleClass().add("uncollapsible-titled-pane");

mainPane.setTop(titledPane);
mainPane.setMaxSize(250, 300);
Expand Down
5 changes: 4 additions & 1 deletion qupath-gui-fx/src/main/resources/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,12 @@
-fx-text-fill: -qp-script-error-color;
}


/* Don't make the title for the training piechart too large */
.training-chart .chart-title {
-fx-font-size: 1em;
-fx-font-weight: bold;
}

.uncollapsible-titled-pane > .title:hover {
-fx-color: -fx-base;
}
1 change: 1 addition & 0 deletions qupath-gui-fx/src/main/resources/css/titled_plain.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-fx-background-color: transparent;
-fx-border-color: null;
}

.titled-pane > *.content {
-fx-border-color: transparent;
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</HBox>
</VBox>
</TitledPane>
<TitledPane fx:id="inst" animated="false" collapsible="false" maxHeight="1.7976931348623157E308" text="%ExtensionControlPane.installedExtensions" VBox.vgrow="ALWAYS">
<TitledPane fx:id="inst" styleClass="uncollapsible-titled-pane" animated="false" collapsible="false" maxHeight="1.7976931348623157E308" text="%ExtensionControlPane.installedExtensions" VBox.vgrow="ALWAYS">
<ListView fx:id="extensionListView" maxHeight="1.7976931348623157E308" styleClass="extension-manager-list-view" />
</TitledPane>
<AnchorPane fx:id="ap">
Expand Down
Loading