improve UI
authorNiki Roo <niki@nikiroo.be>
Thu, 7 May 2020 19:00:28 +0000 (21:00 +0200)
committerNiki Roo <niki@nikiroo.be>
Thu, 7 May 2020 19:00:28 +0000 (21:00 +0200)
src/be/nikiroo/fanfix_swing/gui/TouchFrame.java
src/be/nikiroo/fanfix_swing/gui/viewer/ViewerImages.java

index 56f958de7c736086eefa23bc53733db870fc587a..b2daba0672259efe6fa13c69dd8d913181af3ce3 100644 (file)
@@ -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) {
index 99e44fbe51aeed325d9298a6a5e5e52d52f983fe..35985228e738b831a8595b42ea9e2a6ef99ec0d5 100644 (file)
@@ -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