Skip to content

Commit 2e4aa3f

Browse files
committed
fixed AER display. fixed button collapse when no lables.
1 parent f4015dc commit 2e4aa3f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/FingerPanel.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ public FingerPanel (KeyMap keys, TwidorPreference pref ) {
7474

7575
{
7676
JPanel panel = new JPanel();
77-
setMinimumSize(new Dimension(twiddlerX / 2, windowY / 8));
7877
panel.setComponentOrientation( keyOrient );
7978
panel.setLayout(new GridLayout(0, (pref.show_SCC && pref.show_key_labels) ? 12 : 3, 1, 4));
8079
panel.setBackground(twiddlerBackground);
@@ -135,6 +134,7 @@ else if (finger > chordFinger) {
135134
{ // single button keymap
136135
int buttons = KeyElement.buttonMask(finger, fingerCol);
137136
JPanel subPanel = new JPanel();
137+
subPanel.setPreferredSize(new Dimension(buttonX, buttonY));
138138
subPanel.setBackground(buttonBackground);
139139
subPanel.setLayout(new GridLayout(3, 1));
140140
// Color color = keyRed;

src/Stats.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public void addPressed (KeyElement pressed, long time) {
131131
typed = typed.substring(0, typed.length() - 1);
132132
} else {
133133
transcribedInput.add(new StatsElement(pressed, time));
134-
typed += (char)pressed.getKeycode();
134+
typed += pressed.getMacro();
135135
}
136136
}
137137

src/TwidorConstants.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public interface TwidorConstants {
6060
/**
6161
* button attributes
6262
*/
63-
public static final int buttonX = (twiddlerX - 30) / 6;
64-
public static final int buttonY = windowY * 2 / 15; // 2/3 of 1/4 of 4/5 of windowY
63+
public static final int buttonX = twiddlerX / 6;
64+
public static final int buttonY = windowY * 2 / 15; // 2/15 = 2/3 of 1/4 of 4/5
6565
public static final Color buttonBackground = Color.getHSBColor(0.f, 0.f, 0.95f);
6666
public static final Color buttonHighlight = Color.getHSBColor(0.f, .2f, 1.f);
6767
public static final Color mccHighlight = Color.getHSBColor(0.f, .2f, 1.f);

0 commit comments

Comments
 (0)