Skip to content

Commit

Permalink
fix: Use correct pointer styles in BookGrid
Browse files Browse the repository at this point in the history
fix: Use uniform colors in Chart tooltips
  • Loading branch information
TatuLund committed Oct 28, 2024
1 parent 5bc3a1d commit 3aa2fab
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import com.vaadin.addon.charts.Chart;
import com.vaadin.addon.charts.model.ChartType;
import com.vaadin.addon.charts.model.Configuration;
import com.vaadin.addon.charts.model.DataSeries;
import com.vaadin.addon.charts.model.DataSeriesItem;
import com.vaadin.addon.charts.model.Lang;
Expand Down Expand Up @@ -81,6 +82,7 @@ private CssLayout createPriceChart() {
var conf = priceChart.getConfiguration();
conf.setTitle(getTranslation(I18n.Stats.PRICES));
conf.setLang(lang);
configureTooltip(conf);
priceChartWrapper.addComponent(priceChart);
return priceChartWrapper;
}
Expand All @@ -94,6 +96,7 @@ private CssLayout createCategoryChart() {
var conf = categoryChart.getConfiguration();
conf.setTitle(getTranslation(I18n.CATEGORIES));
conf.setLang(lang);
configureTooltip(conf);
categoryChartWrapper.addComponent(categoryChart);
return categoryChartWrapper;
}
Expand All @@ -107,10 +110,17 @@ private CssLayout createAvailabilityChart() {
var conf = availabilityChart.getConfiguration();
conf.setTitle(getTranslation(I18n.Stats.AVAILABILITIES));
conf.setLang(lang);
configureTooltip(conf);
availabilityChartWrapper.addComponent(availabilityChart);
return availabilityChartWrapper;
}

private static void configureTooltip(Configuration conf) {
conf.getTooltip()
.setBackgroundColor(new SolidColor("rgba(50,50,50,0.9)"));
conf.getTooltip().getStyle().setColor(new SolidColor("white"));
}

/**
* Updates the statistics asynchronously.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,20 @@
color: $v-focus-color;
}

.bookview-grid-locked:not(.v-grid-row-selected) {
.bookview-grid-locked:not(.v-grid-row-selected) {
opacity: $v-disabled-opacity;
animation: fadeIn 1s ease-in-out 0s;
cursor: default !important;
}

.bookview-grid-descriptioncaption {
color: $highlight-contrast-color;
}

.bookview .v-grid tbody tr {
cursor: pointer;
}

// sidebar editor for CRUD, scrolls if there is not enough space vertically
.bookform-wrapper {
position: absolute;
Expand Down

0 comments on commit 3aa2fab

Please sign in to comment.