mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Make allowed gap customizable. Change default value to 2px.
GitOrigin-RevId: 62382f91d52b0d1d0301b13e1b57692133cd6c80
This commit is contained in:
committed by
intellij-monorepo-bot
parent
240bca3b78
commit
89e00a8f2c
@@ -1,5 +1,6 @@
|
||||
package com.intellij.internal.rulerguide;
|
||||
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.ui.JBColor;
|
||||
|
||||
import java.awt.*;
|
||||
@@ -21,7 +22,9 @@ final class BasePreferences {
|
||||
new Color(255, 255, 255, 32)
|
||||
);
|
||||
|
||||
public static final int ALLOWED_GAP = 1;
|
||||
public static int getAllowedGap() {
|
||||
return Registry.intValue("ide.ruler.guide.allowed.gap", 1);
|
||||
}
|
||||
|
||||
private BasePreferences() {
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ final class RulerGuidePainter extends AbstractPainter implements Disposable {
|
||||
int horizontalOffset = Math.abs(baselineOtherPoint.y - baselinePivotPoint.y);
|
||||
if (verticalOffset == 0 || horizontalOffset == 0) {
|
||||
g2d.setColor(FINE_COLOR);
|
||||
} else if (verticalOffset <= ALLOWED_GAP || horizontalOffset <= ALLOWED_GAP) {
|
||||
} else if (verticalOffset <= getAllowedGap() || horizontalOffset <= getAllowedGap()) {
|
||||
g2d.setColor(ERROR_COLOR);
|
||||
} else continue;
|
||||
|
||||
|
||||
@@ -1267,6 +1267,8 @@ ide.window.shadow.painter=false
|
||||
ide.window.shadow.painter.restartRequired=true
|
||||
ide.window.shadow.painter.description=Enables light-weight shadows for heavy-weight child windows (Windows only)
|
||||
|
||||
ide.ruler.guide.allowed.gap=2
|
||||
ide.ruler.guide.allowed.gap.description=Gap in pixels considered as an error in the layout
|
||||
ide.win.frame.decoration=true
|
||||
ide.win.frame.decoration.description=Enables Frame and Dialog decorations for IntelliJ and Darcula LaFs on Windows
|
||||
ide.win.frame.decoration.restartRequired=true
|
||||
|
||||
Reference in New Issue
Block a user