diff options
author | Yana Stamcheva <yana@jitsi.org> | 2011-05-30 11:39:32 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2011-05-30 11:39:32 +0000 |
commit | 912204639150d59d91ab0066ff275d8ea5f01e1c (patch) | |
tree | 5e65a3dd89e96b5cf7235c88e318155785ce34de /src/net/java | |
parent | 7ea9f5f0ad7ba3456e44d120fabd5e80618bad3e (diff) | |
download | jitsi-912204639150d59d91ab0066ff275d8ea5f01e1c.zip jitsi-912204639150d59d91ab0066ff275d8ea5f01e1c.tar.gz jitsi-912204639150d59d91ab0066ff275d8ea5f01e1c.tar.bz2 |
Shows resolution information in the new resize video button menu.
Diffstat (limited to 'src/net/java')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/call/ResizeVideoButton.java | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/ResizeVideoButton.java b/src/net/java/sip/communicator/impl/gui/main/call/ResizeVideoButton.java index db47f7f..4cd7aaf 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/ResizeVideoButton.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/ResizeVideoButton.java @@ -93,28 +93,26 @@ public class ResizeVideoButton popupMenu.setInvoker(this); popupMenu.setFocusable(true); + Dimension loDimension = QualityPreset.LO_QUALITY.getResolution(); + Dimension sdDimension = QualityPreset.SD_QUALITY.getResolution(); + Dimension hdDimension = QualityPreset.HD_QUALITY.getResolution(); + JMenuItem lowQuality = new JMenuItem( GuiActivator.getResources() .getI18NString("service.gui.LOW_QUALITY") - + " (" - + (int) QualityPreset.LO_QUALITY.getResolution().getHeight() - + "p)", + + getFormattedDimension(loDimension), GuiActivator.getResources() .getImage("service.gui.icons.LO_VIDEO_ICON")); JMenuItem normalQuality = new JMenuItem(GuiActivator.getResources() .getI18NString("service.gui.SD_QUALITY") - + " (" - + (int) QualityPreset.SD_QUALITY.getResolution().getHeight() - + "p)", + + getFormattedDimension(sdDimension), GuiActivator.getResources() .getImage("service.gui.icons.SD_VIDEO_ICON")); JMenuItem hdQuality = new JMenuItem(GuiActivator.getResources() .getI18NString("service.gui.HD_QUALITY") - + " (" - + (int) QualityPreset.HD_QUALITY.getResolution().getHeight() - + "p)", + + getFormattedDimension(hdDimension), GuiActivator.getResources() .getImage("service.gui.icons.HD_VIDEO_ICON")); @@ -172,4 +170,15 @@ public class ResizeVideoButton return popupMenu; } + + /** + * Returns a formatted string representing the given dimension. + * + * @param d the dimension to represent in the string + * @return the formatted dimension string + */ + private String getFormattedDimension(Dimension d) + { + return " (" + (int) d.getWidth() + "x" + (int) d.getHeight() + ")"; + } } |