Skip to content

Commit

Permalink
fix display of metrics question
Browse files Browse the repository at this point in the history
  • Loading branch information
i-make-robots committed Jan 29, 2025
1 parent e5e6e28 commit 790b694
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import com.marginallyclever.makelangelo.Translator;
import com.marginallyclever.makelangelo.select.SelectBoolean;
import com.marginallyclever.makelangelo.select.SelectPanel;
import com.marginallyclever.makelangelo.select.SelectReadOnlyText;
import com.marginallyclever.util.PreferencesHelper;

import javax.swing.text.JTextComponent;
import java.util.prefs.Preferences;

public class MetricsPreferences {
Expand All @@ -15,11 +17,15 @@ public class MetricsPreferences {

static public SelectPanel buildPanel() {
panel = new SelectPanel();

var aboutHtml = Translator.get("MetricsPreferences.collectAnonymousMetrics");
final JTextComponent bottomText = SelectReadOnlyText.createJEditorPaneWithHyperlinkListenerAndToolTipsForDesktopBrowse(aboutHtml);

Preferences prefs = PreferencesHelper.getPreferenceNode(PreferencesHelper.MakelangeloPreferenceKey.METRICS);
collectAnonymousMetricsCheckbox = new SelectBoolean("collect",
Translator.get("MetricsPreferences.collectAnonymousMetrics"),
collectAnonymousMetricsCheckbox = new SelectBoolean("collect", "",
prefs.getBoolean(COLLECT_ANONYMOUS_METRICS_LABEL, false));

panel.add(bottomText);
panel.add(collectAnonymousMetricsCheckbox);

return panel;
Expand Down

0 comments on commit 790b694

Please sign in to comment.