Skip to content

Commit

Permalink
Fine tuning for #177.
Browse files Browse the repository at this point in the history
  • Loading branch information
DarwinNE committed Apr 26, 2020
1 parent b9a7958 commit d9493f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 5 additions & 3 deletions src/net/sourceforge/fidocadj/FidoFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public FidoFrame (boolean appl, Locale loc)
// If we can not access to the preferences, we inizialize those
// configuration variables with default values.
libDirectory = System.getProperty("user.home");
smallIconsToolbar = true;
smallIconsToolbar = false;
textToolbar = true;
prefs=null;
}
Expand Down Expand Up @@ -361,11 +361,13 @@ public final void readPreferences()
// resolution screens begin to be widespread. So, if the pixel
// density is greater than 150 dpi, bigger icons are used by at the
// very first time FidoCadJ is run.
if(java.awt.Toolkit.getDefaultToolkit().getScreenResolution()>150) {
/*if(java.awt.Toolkit.getDefaultToolkit().getScreenResolution()>150) {
defaultSize="false";
} else {
defaultSize="true";
}
}*/
// 2020 I suspect the best result is now obtained with "false".
defaultSize="false";

smallIconsToolbar = prefs.get("SMALL_ICON_TOOLBAR",
defaultSize).equals("true");
Expand Down
10 changes: 4 additions & 6 deletions src/net/sourceforge/fidocadj/macropicker/SearchField.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
* a placeholder string (when the user hasn't yet typed anything), and a button
* to clear the currently-entered text.
// TODO: add a menu of recent searches.
// TODO: make recent searches persistent.
*
* @author Elliott Hughes
* http://elliotth.blogspot.com/2004/09/cocoa-like-search-field-for-java.html
Expand Down Expand Up @@ -115,11 +111,13 @@ private void showPlaceHolder(Graphics g)

// Calculate text position.
left = getBorder().getBorderInsets(this).left;
bottom = (int) (getHeight() / 2.0 + fontHeight / 2.0);

bottom = (int) ((getHeight()-4) / 2.0 + fontHeight / 2.0);
// Show placeholder text when focused.
if (!isFocusOwner() && getText().length() == 0) {
g.setColor(Color.GRAY);
Graphics2D g2=(Graphics2D) g;
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g.drawString(placeholderText, left, bottom);
}
}
Expand Down

0 comments on commit d9493f8

Please sign in to comment.