If the height had been reduced due to a very wide window being shown,
it was not reset to its full value when switching back to a more
narrow preview. Fix this by relayouting the window.
Signed-off-by: Augustin Cavalier <[email protected]>
The aspect ratio of the preview was wrong for two reasons:
* The height of the preview was always assumed to be 150 while it actually
depends on the layout.
* The size was then only set using SetExplicitMinSize(), which is not
sufficient to actually change the size to the desired value.
Fixes#11644.
Signed-off-by: Augustin Cavalier <[email protected]>
- The Backgrounds preferences app will now accept color drops.
- The Backgrounds app will update if a color drop to the desktop
has changed its color due to a direct color drop
Signed-off-by: Jerome Duval <[email protected]>
When a translator is uninstalled, BTranslatorPrivate::_RemoveTranslators is
called. This method used to unload the image containing the translator after
calling Release() on it resulting in several problems:
- If the translator was still busy, e.g. translating something while being
installed, it crashed since the image was unloaded even though its refcount
was larger than 0.
- Applications using code from one of the translators (e.g. its config view)
would crash when the translator is uninstalled (this is bug #12005).
This problem is now fixed. The roster keeps track of all translators whose
image it manages (even if the translator was already removed from the roster).
It also keeps a refcount to all images. When a translator's refcount drops to
zero and it belonged to a roster at some point, it does not delete itself, but
notifies the roster that it is ready to destruct, which then removes it from
the roster if the translator is still in it, destroys the translator, decrements
the refcount of the image and if the new refcount is zero, unloads the image.
All of this is done in a message handler, since if the translator called
TranslatorDeleted like before, the unloaded image would be referenced when
the stack is walked up.
Finally, the DataTranslations preflet is required to Acquire() the translator
whose config view it is showing, because otherwise its refcount could be reduced
to 0 and the image unloaded. BTranslatorRoster now enables users to acquire a
translator by ID. By the time the translator has to be released, it might not
be part of the roster anymore though. Since BTranslatorRoster tries not to give
out raw pointers to the translators it manages, users who acquire a translator
through a roster now are given a BTranslatorReleaseDelegate, which allows for
releasing the BTranslator exactly once and then self-destructs.
Signed-off-by: Axel Dörfler <[email protected]>