From d0ecb2efd295bf6a3168c6fafbf6a1d0b768bf0d Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Fri, 24 Oct 2014 19:48:50 +0400 Subject: [PATCH] Fix the layout of the Usage Statistics configurable --- .../configurable/StatisticsConfigurable.java | 3 ++- .../StatisticsConfigurationComponent.form | 22 +++++-------------- .../StatisticsConfigurationComponent.java | 5 ++--- .../src/messages/StatisticsBundle.properties | 7 ++++-- 4 files changed, 15 insertions(+), 22 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurable.java b/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurable.java index 0a70d05c708f..94a12bb944fd 100644 --- a/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurable.java +++ b/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurable.java @@ -16,6 +16,7 @@ package com.intellij.internal.statistic.configurable; import com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent; +import com.intellij.openapi.options.Configurable; import com.intellij.openapi.options.ConfigurationException; import com.intellij.openapi.options.SearchableConfigurable; import org.jetbrains.annotations.Nls; @@ -25,7 +26,7 @@ import org.jetbrains.annotations.Nullable; import javax.swing.*; -public class StatisticsConfigurable implements SearchableConfigurable { +public class StatisticsConfigurable implements SearchableConfigurable, Configurable.NoScroll { private boolean modifiedByDefault; diff --git a/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurationComponent.form b/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurationComponent.form index 5a20875acb0f..6015b65620e0 100644 --- a/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurationComponent.form +++ b/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurationComponent.form @@ -3,7 +3,7 @@ - + @@ -38,8 +38,8 @@ - - + + @@ -75,22 +75,12 @@ - - + - + - - - - - - - - - - + diff --git a/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurationComponent.java b/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurationComponent.java index 6aa0329a831e..15d3e63727f0 100644 --- a/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurationComponent.java +++ b/platform/platform-impl/src/com/intellij/internal/statistic/configurable/StatisticsConfigurationComponent.java @@ -21,7 +21,7 @@ import com.intellij.internal.statistic.connect.StatisticsService; import com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent; import com.intellij.openapi.application.ApplicationInfo; import com.intellij.openapi.application.ApplicationNamesInfo; -import com.intellij.util.ui.UIUtil; +import com.intellij.ui.RelativeFont; import javax.swing.*; import java.awt.event.ActionEvent; @@ -37,14 +37,13 @@ public class StatisticsConfigurationComponent { private JRadioButton myMonthlyRadioButton; private JRadioButton myWeeklyRadioButton; private JLabel myLabel; - private JPanel myRadioButtonPanel; public StatisticsConfigurationComponent() { String product = ApplicationNamesInfo.getInstance().getFullProductName(); String company = ApplicationInfo.getInstance().getCompanyName(); myTitle.setText(StatisticsBundle.message("stats.title", product, company)); myLabel.setText(StatisticsBundle.message("stats.config.details", company)); - myLabel.setFont(UIUtil.getLabelFont(UIUtil.FontSize.SMALL)); + RelativeFont.SMALL.install(myLabel); myAllowToSendUsagesCheckBox.setText(StatisticsBundle.message("stats.config.allow.send.stats.text", company)); myAllowToSendUsagesCheckBox.addActionListener(new ActionListener() { diff --git a/platform/platform-resources-en/src/messages/StatisticsBundle.properties b/platform/platform-resources-en/src/messages/StatisticsBundle.properties index e7705d703990..3f37e06b648d 100644 --- a/platform/platform-resources-en/src/messages/StatisticsBundle.properties +++ b/platform/platform-resources-en/src/messages/StatisticsBundle.properties @@ -1,4 +1,7 @@ -stats.title=Help improve {0} by sending anonymous usage statistics to {1} +stats.title=Help improve {0} by sending anonymous usage statistics to {1} stats.config.allow.send.stats.text=Allow sending usage statistics to {0} -stats.config.details=We are asking your permission to send information about your plugins configuration (what is enabled
and what is not) and feature usage statistics (e.g. how frequently you are using code completion).
This data is anonymous, does not contain any personal information, collected for use only by {0}
and will never be transmitted to any third party. \ No newline at end of file +stats.config.details=We are asking your permission to send information about your plugins configuration \ + (what is enabled and what is not) and feature usage statistics (e.g. how frequently you are using code completion). \ + This data is anonymous, does not contain any personal information, \ + collected for use only by {0} and will never be transmitted to any third party. \ No newline at end of file