Skip to content

Commit

Permalink
FINISH !!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Dams4K committed Feb 12, 2023
1 parent 796a6bb commit 9d2e954
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ public void addHexTextField() {
hexColorPanel.setPreferredSize(new Dimension(size.width, 44));
hexColorPanel.setMaximumSize(new Dimension(size.width, 44));

hexColorLabel.setPreferredSize(new Dimension((size.width-12)/2, 24));
hexColorLabel.setMaximumSize(new Dimension((size.width-12)/2, 24));
hexColorLabel.setPreferredSize(new Dimension((size.width-16)/2, 24));
hexColorLabel.setMaximumSize(new Dimension((size.width-16)/2, 24));
hexColorPanel.add(hexColorLabel);

hexColorField = new TextField(this.TEXTURES_SCALE, alphaChannel == true ? 8 : 6);
hexColorField.setPreferredSize(new Dimension((size.width-12)/2, 32));
hexColorField.setMaximumSize(new Dimension((size.width-12)/2, 32));
hexColorField.setPreferredSize(new Dimension(140, 32));
hexColorField.setMaximumSize(new Dimension(140, 32));
LimitedDocument document = (LimitedDocument) this.hexColorField.getDocument();
document.anythings = false;
document.digits = true;
Expand All @@ -181,7 +181,7 @@ public void addPreviews(Color oldColor) {

oldColorPreview.setColor(oldColor);
updateColorPreview();
int colorPreviewWidth = (int) (size.width/2)-48;
int colorPreviewWidth = 140;
int colorPreviewHeight = 36;
newColorPreview.setPreferredSize(new Dimension(colorPreviewWidth, colorPreviewHeight));
newColorPreview.setMaximumSize(new Dimension(colorPreviewWidth, colorPreviewHeight));
Expand All @@ -199,7 +199,7 @@ public void addCloseButtons() {
closeButtons.setMaximumSize(new Dimension(size.width, 64));
background.add(closeButtons);

cancelButton.setPreferredSize(new Dimension(size.width / 2 - 8, 48));
cancelButton.setPreferredSize(new Dimension(140, 48));
cancelButton.addButtonListener(new ButtonListener() {
@Override
public void buttonClicked() {
Expand All @@ -212,7 +212,7 @@ public void buttonClicked() {
});
closeButtons.add(cancelButton);

okButton.setPreferredSize(new Dimension(size.width / 2 - 8, 48));
okButton.setPreferredSize(new Dimension(140, 48));
okButton.addButtonListener(new ButtonListener() {
@Override
public void buttonClicked() {
Expand Down

0 comments on commit 9d2e954

Please sign in to comment.