Skip to content

Commit

Permalink
updated buttons
Browse files Browse the repository at this point in the history
rename button, changed icon, added tooltips
  • Loading branch information
baslo2 committed Jul 24, 2024
1 parent 92d0a86 commit c201655
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,11 @@ private void populateBlockJournalPathGroup(Composite container) {
journalsPathText.setText(settings.getBlocksJournalPath());
journalsPathText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

Button btnDefDir = new Button(generalGroup, SWT.PUSH);
btnDefDir.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, true));
btnDefDir.setImage(ImageUtils.getImage(Images.FOLDER));
btnDefDir.addSelectionListener(new SelectionAdapter() {
Button btnSetDefaulfDir = new Button(generalGroup, SWT.PUSH);
btnSetDefaulfDir.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, true));
btnSetDefaulfDir.setImage(ImageUtils.getImage(Images.BACK));
btnSetDefaulfDir.setToolTipText(resourceBundle.getString("return_default_folder"));
btnSetDefaulfDir.addSelectionListener(new SelectionAdapter() {

@Override
public void widgetSelected(SelectionEvent e) {
Expand All @@ -175,6 +176,7 @@ public void widgetSelected(SelectionEvent e) {
Button btnDir = new Button(generalGroup, SWT.PUSH);
btnDir.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, true));
btnDir.setImage(ImageUtils.getImage(Images.FOLDER));
btnDir.setToolTipText(resourceBundle.getString("choose_dir"));
btnDir.addSelectionListener(new SelectionAdapter() {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ protected Object[][] getContents() {
{"select_ui_language", "UI language (requires restart)"},
{"path", "Path to save block journals"},
{"choose_dir", "Choose directory"},
{"return_default_folder", "Return default folder"},

// create database dialog
{"name", "Connection name*"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ protected Object[][] getContents() {
{"select_ui_language", "Язык интерфейса (требует перезапуска)"},
{"path", "Путь хранения журналов блокировок"},
{"choose_dir", "Выберите директорию"},
{"return_default_folder", "Вернуть папку по уполчанию"},

// create database dialog
{"name", "Имя соединения*"},
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/ru/taximaxim/pgsqlblocks/utils/Images.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public enum Images {
HIDE_LOG_PANEL("images/log_hide_16.png"),
BLOCKS_JOURNAL_FOLDER("images/blocks_journal_folder_16.png"),
FOLDER("images/folder_16.png"),
TABLE("images/table_16.png");
TABLE("images/table_16.png"),
BACK("images/back-16.png");

private String location;

Expand Down
Binary file added src/main/resources/images/back-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c201655

Please sign in to comment.