From 34413659cfc2ffdc40f43f34f8de8becfead7881 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Thu, 7 May 2020 21:00:28 +0200 Subject: [PATCH] improve UI --- src/be/nikiroo/fanfix_swing/gui/TouchFrame.java | 9 ++++++--- src/be/nikiroo/fanfix_swing/gui/viewer/ViewerImages.java | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/be/nikiroo/fanfix_swing/gui/TouchFrame.java b/src/be/nikiroo/fanfix_swing/gui/TouchFrame.java index 56f958de..b2daba06 100644 --- a/src/be/nikiroo/fanfix_swing/gui/TouchFrame.java +++ b/src/be/nikiroo/fanfix_swing/gui/TouchFrame.java @@ -25,6 +25,9 @@ import be.nikiroo.fanfix_swing.gui.book.BookInfo; import be.nikiroo.fanfix_swing.gui.utils.UiHelper; import be.nikiroo.fanfix_swing.gui.viewer.ViewerImages; import be.nikiroo.fanfix_swing.gui.viewer.ViewerNonImages; +import be.nikiroo.fanfix_swing.images.IconGenerator; +import be.nikiroo.fanfix_swing.images.IconGenerator.Icon; +import be.nikiroo.fanfix_swing.images.IconGenerator.Size; public class TouchFrame extends JFrame { private JPanel root; @@ -139,11 +142,11 @@ public class TouchFrame extends JFrame { JComponent scroll = comps[0]; - JToolBar navbar = new JToolBar(); + JPanel navbar = new JPanel(); navbar.add(comps[1]); - JToolBar zoombox = new JToolBar(); - JButton exit = new JButton("Ex"); // TODO: icon + JPanel zoombox = new JPanel(); + JButton exit = new JButton(IconGenerator.get(Icon.back, Size.x32)); exit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerImages.java b/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerImages.java index 99e44fbe..35985228 100644 --- a/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerImages.java +++ b/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerImages.java @@ -213,8 +213,8 @@ public class ViewerImages extends JFrame { zoombox.setIcons(// IconGenerator.get(Icon.zoom_in, Size.x32), // IconGenerator.get(Icon.zoom_out, Size.x32), // - null, // TODO - null// TODO + IconGenerator.get(Icon.fit_to_width, Size.x32), // + IconGenerator.get(Icon.fit_to_height, Size.x32) // ); zoombox.addActionListener(new ActionListener() { @Override -- 2.27.0