mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Fix image alignment in media dialog search
Make the image results align to the full width of the dialog. This fix uses dynamic values of the width of the container rather than a hard-coded value so it should work properly on all themes. Bug: T78050 Change-Id: I05bb0d8a8b13c246840382b12e098d0579180016
This commit is contained in:
parent
0a86323d48
commit
fbb6cd92b4
|
@ -108,6 +108,15 @@ ve.ui.MWMediaSearchWidget.prototype.queryMediaSources = function () {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HACK: fit four images in the screen
|
||||||
|
// The -45 is here because the way the container is aligned, it
|
||||||
|
// is pushed behind the scrollbar. When we calculate the new size
|
||||||
|
// of the image results, we need to account for a bit thinner than
|
||||||
|
// the actual (partially hidden) width.
|
||||||
|
// Note: This will be fixed in an upcoming rewrite of the image
|
||||||
|
// search results.
|
||||||
|
this.size = ( this.results.$element.innerWidth() - 45 ) / 4;
|
||||||
|
|
||||||
// Reset message
|
// Reset message
|
||||||
this.$noItemsMessage.hide();
|
this.$noItemsMessage.hide();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue