My System Specs:
Slackware 14.2 x86_64
Openbox 3.6.1
qt-4.8.7
avidemux 2.6.12
When I open avidemux, avidemux3_qt4, I noticed that if I try and resize the window, then close and reopen it, it will default back to a size it wants to maintain.
It would be great if we could resize the window and have it maintain this position, as well as the desktop position we want to open it in.
I would appreciate to see that feature too (windows 7 x64) for the following reason:
there are some threads that describe that ADM
Quoteshould not resize its window by default but zoom the video smoothly to fit into the available space
eg.: in http://avidemux.org/smif/index.php/topic,17069.msg76523.html#msg76523 (http://avidemux.org/smif/index.php/topic,17069.msg76523.html#msg76523)
or in http://avidemux.org/smif/index.php/topic,16955.0.html (http://avidemux.org/smif/index.php/topic,16955.0.html)
I understand a solution is not quite easy here.
But i'm suffering that oftenly a resized main vindow leads ghosted controls out of the desktop - eg. the close button on the
upper right part of the main window disappears / is out of screen.
In most cases, at least a preference "remember window pos" could help here, as it would allow to shift the starting position
of ADM slightly more to left permanently. Actually ADM always starts screen-centered and i need to move the main window to the left after each restart manually, which is somehow annoying.
I'm somehow wondering as there are no feedbacks about this issue,
as storing a window's position appears to be a common asset for recent programs.
Am i faulty?
As far as the postion is concerned, It is done by the window manager i think, not by avidemux
Could be possible issue: GUI is not primary process to start? (called from another?) (Terminal calls Gui and open 2nd window) Sorry for non technical thinking.
Thanks for replies, mean and Jan!
Window manager? As far as the OS Windows is referred (my case; Win7, x64),
each program's main window must have an x-y pos, width and height as properties: by that the starting pos is defined.
Normally, if you intend to screen-center a form, you have additional work to do yourself _manually_, somehting like
this.Location = new Point((Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2,
(Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2);
OR you have some macro for the windows style available, provided by the compiler, something like
this.StartPosition = FormStartPosition.CenterScreen;
The normal case should be to use the x, y - position property and have not align macro or style definition.
I guess, in windows coding you use something like that behind the scenes.
I would vote not to use screen alignment of the main window but x, y pos and save them as pref.
That had never been a problem for me until i noticed cases where the ADM main windows was resized by contents
and parts of the main window now are truncated by the screen boundary (parts become invisible).
meanwhile you could try with not full sceen avidemux window:
zoom using keyboard short-cut numeric keypad: zoom out, zoom in
- 4 then numeric keypad 3 (small desktop real estate)
- 3 then numeric keypad 2 ( larger desktop real estate) if you window maximizes use (small desktop real estate)
- 2 then numeric keypad 1 ( largest desktop real estate) if you window maximizes use (large desktop real estate)
seems to work acceptable as temporary measure on ubuntu.
you don't get a 720p fully in the avidemux window, after the eumagga0x2a tweak for to small monitors (Lower then 1920 x 1080 display)
Ideally upon loading video the video should be displayed with at least the video showing fully in zoomed 4, 3, 2, 1 if one of this modes is possible on the available screen where avidemux GUI resides (monitor 0, monitor 1, monitor 2 or monitor 4)
Detect current monitor and its free desktop space, open there the avidemux gui with movie showing (zoomed or not) without cut-off on sides of bottom. This used to be so 720p or 1080i did always open this way.
Possible save current position and used window size of the avidemux GUI.
Thank you Jan, this is a useful hint!! :)
Just i found two links showing that a screen centering of a form does require additional extra-coding:
MSDN: .NET Framework; Visual C# :
https://social.msdn.microsoft.com/Forums/vstudio/en-US/68e32932-4082-4ad0-b26d-c1d05df1bdcd/move-a-form-to-center-position?forum=csharpgeneral
(https://social.msdn.microsoft.com/Forums/vstudio/en-US/68e32932-4082-4ad0-b26d-c1d05df1bdcd/move-a-form-to-center-position?forum=csharpgeneral) The same appears to be valid for QT too:
http://www.qtcentre.org/threads/43158-How-to-center-main-window-on-screen
(http://www.qtcentre.org/threads/43158-How-to-center-main-window-on-screen)
Please, please, please don't take this path. Nothing is broken in the
placement of Avidemux window, please don't fix what is not broken. There are major issues with
resizing of Avidemux window incl. internal resizing of Avidemux GUI. I really hope that there will be some progress on this topic soon.
Quote from: Jan Gruuthuse on September 09, 2016, 02:11:44 PM
you don't get a 720p fully in the avidemux window, after the eumagga0x2a tweak for to small monitors (Lower then 1920 x 1080 display)
I'm sorry, but I have no idea what you are referring to. The only code change I suggested was a half-assed workaround for the width of Avidemux window being always too small for given video dimensions: [Qt/UI] Bigger window patch (eumagga0x2a) (https://github.com/mean00/avidemux2/commit/8987c1d95e2a9907a4ae01943caf9766ac814c4c). A partial fix by Mean for window resizing on playback was checked in as [Render] Only resize when something has changed (https://github.com/mean00/avidemux2/commit/8987c1d95e2a9907a4ae01943caf9766ac814c4c). It didn't change the basic logic of Avidemux window resizing.
I'm not a coder, so I can't tell what exactly did happen. Just the observation: when you open now a video 720p or 1080i bottom part and/or right hand are not visible on the gui. You need to drag to get complete video in GUI (full or zoomed)
loaded video
(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fimg5.fotos-hochladen.net%2Fuploads%2F1080iloaded53zikg2fdy.png&hash=d2159445515579ddc33b614a64c1803c5a3361ed)
adjusted video
(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fimg5.fotos-hochladen.net%2Fuploads%2F1080icompletebpva2g1mnz.png&hash=a2a4668724d803675c113de2ffae02c297a60294)
Quote from: Jan Gruuthuse on September 10, 2016, 05:22:49 AM
when you open now a video 720p or 1080i bottom part and/or right hand are not visible on the gui. You need to drag to get complete video in GUI (full or zoomed)
This is a Qt limitation ajschult wrote about in http://avidemux.org/smif/index.php/topic,16955.msg75877.html#msg75877 (http://avidemux.org/smif/index.php/topic,16955.msg75877.html#msg75877). It has been always this way in Avidemux with Qt4 and Qt5.
http://doc.qt.io/qt-4.8/qwidget.html#adjustSize (http://doc.qt.io/qt-4.8/qwidget.html#adjustSize)
http://doc.qt.io/qt-5/qwidget.html#adjustSize (http://doc.qt.io/qt-5/qwidget.html#adjustSize)
It does not take into account the screen. Actual monitor display: 3840 x 2160. It behaves the same as on 1920 x 1080 that can't be right? 2/3 of the screen = 2560 x 1740. Somewhere logic / reasoning / understanding mismatch?
Updated: replaced screenshot with link to screenshot (2 monitor, 1 in landscape 16 * 9, 1 portrait mode 9 * 16)
I would recommend this setup for programming or writing. one connected to display port other to hdmi. ;)
dual monitor desktop screendump [3840 x 2160] + [1920 x 1080] (http://img5.fotos-hochladen.net/uploads/720pon4kpug2l3z0mw.png)
Somewhere you should have
- current desktop resolution
- current used monitor (0/1/3/4) and its resolution.
Possible the restriction is for the child window opened in the 1st app window?
You are right, the Qt restriction somehow doesn't apply here (I mean, on my 1920x1080 display) and the height is really too small. Please try
diff --git a/avidemux/qt4/ADM_userInterfaces/ADM_gui/T_preview.cpp b/avidemux/qt4/ADM_userInterfaces/ADM_gui/T_preview.cpp
index b0081cd..276aced 100644
--- a/avidemux/qt4/ADM_userInterfaces/ADM_gui/T_preview.cpp
+++ b/avidemux/qt4/ADM_userInterfaces/ADM_gui/T_preview.cpp
@@ -167,7 +167,7 @@ void UI_updateDrawWindowSize(void *win,uint32_t w,uint32_t h)
displayH = h;
videoWindow->setADMSize(w,h);
- QuiMainWindows->resize(w+218,h+100);
+ QuiMainWindows->resize(w+240,h+240);
#if 0
UI_purge();
It is still a crude workaround for some flaws in the resizing logic.
Desktop can be larger then one monitor.
Case:
Avidemux GUI sits on the Left Monitor top right hand corner, near the right border of that monitor.
Load 720p video.
Avidemux expands the GUI to partial fit the video in to its GUI. (bottom part of video is not showing)
Next it finds itself on Right neighboring monitor.
this with build 5ec05f8 Possible proposed logic
If GUI is not big enough to fit video canvas; move GUI to the left (as far as needed) or center GUI on the current screen.
If center method used, should center on the video canvas and not the Avidemux GUI (width is offset by the left part of avidemux GUI)
Expand avidemux so it fits video canvas 1:1 or zoomed out.
Known info
- used avidemux GUI area: above, below and left of the video canvas.
- resolution of loaded video. add to above GUI area
- current screen desktop
video canvas: are needed to display loaded video.just in case:
http://doc.qt.io/qt-5/qscreen.html#details
http://doc.qt.io/qt-4.8/qscreen.html#details
http://doc.qt.io/qt-5/qdesktopwidget.html
http://doc.qt.io/qt-4.8/qdesktopwidget.html
QuoteQT getting the screen resolution without the extended monitor
You pretty much had it, just give the screen ID of your main monitor to the geometry() call.
QDesktopWidget widget;
QRect mainScreenSize = widget.availableGeometry(widget.primaryScreen()); // or screenG
ideas from/based upon:QT getting the screen resolution without the extended monitor (http://stackoverflow.com/questions/17893328/qt-getting-the-screen-resolution-without-the-extended-monitor#17893751)