Skip to content

Commit

Permalink
GUI edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed May 15, 2024
1 parent 5db9bed commit 7f654b3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion convex-core/src/main/java/convex/core/data/Blobs.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static <T extends ABlob> T createRandom(Random r, long length) {
}

/**
* Converts any blob to a the correct canonical Blob format
* Converts any blob to a correct canonical Blob format
* @param a Any Blob
* @return Canonical version s a Blob or BlobTree
*/
Expand Down
6 changes: 5 additions & 1 deletion convex-gui/src/main/java/convex/gui/peer/PeerGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,11 @@ public static void runLaunchDialog(JComponent parent) {

JButton randomise=new JButton("Randomise",SymbolIcon.get(0xe863,Toolkit.SMALL_ICON_SIZE));
randomise.addActionListener(e->{
keyField.setSelectedItem(HotWalletEntry.create(AKeyPair.generate()));
AKeyPair newKP=AKeyPair.generate();
// System.err.println("Generated key "+newKP.getAccountKey());
// Note we go to the model directly, JComboBox doeesn't like
// setting a selected item to something not in the list when not editable
keyField.getModel().setSelectedItem(HotWalletEntry.create(newKP));
});
pan.add(randomise);

Expand Down
6 changes: 3 additions & 3 deletions convex-gui/src/main/java/convex/gui/utils/Toolkit.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ public class Toolkit {
public static final int SMALL_ICON_SIZE = (int) (16*SCALE);
public static final int MAIN_ICON_SIZE = (int) (64*SCALE);


public static final float DEFAULT_FONT_SIZE=14;
public static final float DEFAULT_FONT_SIZE=16;

public static Font DEFAULT_FONT = new Font(Font.SANS_SERIF,Font.PLAIN,(int)DEFAULT_FONT_SIZE);
public static Font MONO_FONT = new Font(Font.MONOSPACED, Font.BOLD, (int)(DEFAULT_FONT_SIZE));
public static Font BUTTON_FONT = new Font(Font.SANS_SERIF, Font.PLAIN, (int)(DEFAULT_FONT_SIZE*1.6));
public static Font BUTTON_FONT = new Font(Font.SANS_SERIF, Font.PLAIN, (int)(DEFAULT_FONT_SIZE*1.2));

public static final float SYMBOL_FONT_SIZE= DEFAULT_FONT_SIZE;

Expand Down Expand Up @@ -107,6 +106,7 @@ public class Toolkit {
}

protected static LookAndFeel installFlatLaf() {
System.setProperty("flatlaf.uiScale", "1.5");
// System.setProperty("flatlaf.uiScale", Double.toString(SCALE));
FlatDarculaLaf laf=new FlatDarculaLaf();
return laf;
Expand Down

0 comments on commit 7f654b3

Please sign in to comment.