summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2016-10-31Omit comparator which is the same as default std::less<key_type>Takeshi Abe
Change-Id: I72a0b618577caececaaf3eb4df53d4cb192251da Reviewed-on: https://gerrit.libreoffice.org/30369 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-31Avoid excessive text clipping on WindowsKhaled Hosny
Use a better rounding strategy so that when the bounding box involves part of a pixel we include the full pixel, so floor for -ve values and ceil for +ve ones. Without this I see lots of cut text on Windows. Change-Id: I258f63eb37911574cd3f6f08da22349756c0775c
2016-10-31Reduce number of argumentsKhaled Hosny
The font is already a member of the class, and the EM height is unused. Change-Id: Ice2eb2bb3e4b491bcb93123e1c3a08170cdaa50b
2016-10-30toolbox: don't need "ItemImageOriginal" anymoreTomaž Vajngerl
Change-Id: I7037b7a8c70150f9946cca0c48607bd887779c82 Reviewed-on: https://gerrit.libreoffice.org/30405 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-30tdf#103588: Draw with the right font on WindowsKhaled Hosny
Apparently without implementing InitFont(), we might end up drawing with the wrong font, thanks to the arcane ways GDI API. Change-Id: I224de138446d4a536e13992efa98b0f04609576a
2016-10-30vcl: use links to "large" (26px) icons also for 32px iconsTomaž Vajngerl
This adds links to "large" icons (prefixed with "lc_") also for 32px icons automatically so that we don't need to duplicate the links.txt files. Change-Id: I5fc3a769aa795060b6ae2d554cadd81938e4d4ec Reviewed-on: https://gerrit.libreoffice.org/30399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-30tdf#95014 initial support for 32 px icons in toolbarTomaž Vajngerl
This adds support for 32 pixel icons - mainly to get them into the toolbar. Most changes made are to change the behavior of having only small and large icons as a boolean choice, but not every code path was converted to non-boolean choice yet. Breeze icon theme has the 32px variants so it can be used already. Change-Id: Iadf832a87826c16b3a83522104dd6c35d61a0f87 Reviewed-on: https://gerrit.libreoffice.org/30398 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-30MinorKhaled Hosny
Change-Id: I2bce822dd9f4c6b59a93e158ceced541ae52a01b
2016-10-30No need to call ParseFeatures in the constructorKhaled Hosny
Call it once where we will use its results. Change-Id: I63f3ceaf47e68bea9fab29d6836745416cf8ccb8
2016-10-30Always scale HarfBuzz font before using itKhaled Hosny
We cache and reuse the HarfBuzz font, so we need to make sure it always has the right font size before using it. Change-Id: I332c7f51f6495effde529c63485cb4ec658b2ca5
2016-10-30Avoid potential HarfBuzz assertsKhaled Hosny
We need to update the buffer content type ourselves since we are now using the low lever shape plan API that does not do this. Change-Id: I043d15731cf206b142c3153896e194a822a70ffb
2016-10-30tdf#103087 Border widget must not have focus initiallyMaxim Monastirsky
... unless it was opened using the keyboard. Change-Id: I04675211ff043acf7757afed7252e7d7493eadad
2016-10-30Let Menu dispose submenusMaxim Monastirsky
(I'm not sure about how good are the changes from ScopedVclPtr to non-scoped, and disposeAndClear to clear. They aren't really needed, because of the VclReferenceBase::mbDisposed logic. But at least they should be safe, as long as we have disposeOnce calls in Menu's dtor.) See also previous commits: 4433d95b374c13a3501cdf3a6e273f68eb49873a ("MenuItemData now properly disposes the submenu") 89c23b4aaef931b5d6009efaf44ce6e6c976e8d4 ("Sub menus no longer need manual disposing") Change-Id: I9d455a94590f5eec9b097947f6984f1b3e477b52
2016-10-30Rename ServerFont to FreetypeFontKhaled Hosny
This is what it is actually is, we dropped support for server-side fonts for a long time now. Renamed also a few related classes, but left ServerFontLayout* ones as they will go away soonish. Change-Id: I68a6dad51b6972368b7bf85a0b9c8089cc12740e Reviewed-on: https://gerrit.libreoffice.org/30390 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2016-10-30ENABLE_GRAPHITE_DWRITE is always set to 1Khaled Hosny
We don’t have a configure option to turn it off and I don’t think anyone tries building without it. Furthermore, we use the code guarded by this even without Graphite. Change-Id: I0fb434af58a51370a66b5ad7eb89b145e4c015de Reviewed-on: https://gerrit.libreoffice.org/30389 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2016-10-30tdf#103401: Fix applying DX array with font fallbackKhaled Hosny
Turns out if we don’t adjust the glyph width (not only its X position) we will apply the DX adjustment more than once when there is font fallback. Change-Id: I5e72e5d211adf3b378ec23c0cabe38fd0d5c9b19
2016-10-29icon theme name suffixing with "_svg" is unneededTomaž Vajngerl
Change-Id: Ie0f9964d893c520ad02bb33a1d30821735392076 Reviewed-on: https://gerrit.libreoffice.org/30382 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29convert usages of DPIScalingFactor from int to floatTomaž Vajngerl
Change-Id: I049b3d2cde4dcb8c8c0690d75a015a43cb71b0c0 Reviewed-on: https://gerrit.libreoffice.org/30381 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29tdf#100164 change scaling unit to precentage for *.5x factorsTomaž Vajngerl
Currently we support DPI scaling by a integer factor. This commit changes that to percentage so we can have scaling factors like 1.5x or 1.25x. This is useful with 2.7k monitors that are in between standard DPI and HiDPI. Thresholding was adjusted to scale to 1.5x when DPI is between 120 and 168 DPI. The old method GetDPIScaleFactor has been changed to return a float value insted of int. Sometimes it is however more accurate to use GetDPIScalePercentage which was added in this commit. Change-Id: Iaecee793ff3d5084d00adeebbcf5d7368c580882 Reviewed-on: https://gerrit.libreoffice.org/30379 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29vcl: add bitmap::loadFromResource with additional flagsTomaž Vajngerl
Sometimes we want to surpress automatic scaling and converting for dark theme. This adds a loadFromResource function with additional flags which makes this possible. Change-Id: I893cee82ad6942644755f0c5b772fb5f073bbf00 Reviewed-on: https://gerrit.libreoffice.org/30341 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29HiDPI: remove unneeded image scaling when HiDPI is enabledTomaž Vajngerl
We don't need to scale images for HiDPI mode anymore - this is now done automatically when the image is loaded. Change-Id: Ie285cf4d672f4c098a468d3f7560ee2700365b92 Reviewed-on: https://gerrit.libreoffice.org/30340 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29tdf#51733 support SVG icon theme, disk cache and scaling / darkenTomaž Vajngerl
Also resolves tdf#92248 This extends icon name resolving so that is in addition tries to find an icon with the "svg" extension and load that instead of stated (mostly "png") extension. If the filename extension is "svg" we load the icon with the SVG filter instead. This also adds icon scaling and conversion for HiDPI or when a dark theme is wanted. If the SVG icon is available, we render it at a higher resolution instead of scaling As loading of SVG icons can be computatunally expensive, a icon disk cache was added. This saves the rendered SVG as a PNG image into the "cache" folder. The same caching is also used for HiDPI and dark theme converted icons so we don't always scale or convert the icons. In addition some style changes and DRY fixes were made to the ImplImageTree source code. Change-Id: I9e421395a342ffe8da9facea7ea06e5db2778b26 Reviewed-on: https://gerrit.libreoffice.org/30339 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29Add layout engine info to the About dialogKhaled Hosny
Change-Id: I6a87efa5e1072bac3588226df0e1351aa51c4d0d Reviewed-on: https://gerrit.libreoffice.org/30108 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2016-10-28vcl: move method to the appropriate file, some C++11-ificationTomaž Vajngerl
Change-Id: If51d16673c8b241487cae5305e293f213b7db5cb Reviewed-on: https://gerrit.libreoffice.org/30338 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-28tdf#98879: Fix vertical text on Windows for the new layoutKhaled Hosny
The DirectWrite rendering code wasn’t handling vertical text correctly at least when used with CommonSalLayout. It has been fixed and now made the default. We are also doing all vertical text handling on our own, so loading special vertical fonts on Windows is now disabled. Change-Id: I10d150367fe59c77459bb1b813b6f31a0ff0c5d0 Reviewed-on: https://gerrit.libreoffice.org/30346 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2016-10-28ImplInitMenuButtonData can be folded into ctor nowCaolán McNamara
because theres no ResId loader anymore Change-Id: Id90786d710fe75e47c162fd00ad7fd672b9cee30
2016-10-28only draw menubutton separator when two sides do something differentCaolán McNamara
Change-Id: If6e3b72eacef2325f9f30770bbed32c627bc035c
2016-10-28the case without a separator is as a Toolbox itemCaolán McNamara
Change-Id: I948a63ab9741aa89738b5e44b0ec0e078d0faaa0
2016-10-28rename and explain the MENUBUTTON_MENUMODE_TIMED stuffCaolán McNamara
Change-Id: Ifc6ddfb0cc249e537c01f28bab84b42c6b1577d9
2016-10-28ScopedVclPtr vs std::unique_ptr for VclAbstractDialog derivativesCaolán McNamara
Change-Id: I5e43312b6f42ce0c63946f366eaf1e6dcb9629b2 Reviewed-on: https://gerrit.libreoffice.org/30344 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-28tdf#103514: Always ignore bitmap fonts on WindowsKhaled Hosny
We should never see any bitmap fonts now, so all the Courier stuff can go away. Since we never list the bitmap fonts in the first place, the old code for replacing some of them with scalable equivalents never kicks in. We instead implement PreMatchFontSubstitution hook for the same effect. Change-Id: I54f3c068bcd64554ed3498f4ba5b0f76bbd38589 Reviewed-on: https://gerrit.libreoffice.org/30345 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-10-27Sub menus no longer need manual disposingMaxim Monastirsky
after: commit ee79a2dd7ea60e902cab3a9203e307b8a78fee23 Author: Caolán McNamara <caolanm@redhat.com> Date: Fri Jul 29 14:33:22 2016 +0100 Resolves: tdf#101169 crash using column menu in base Change-Id: I7c6e54dd5574c61cffd5884d1cf1b63075073001 Reviewed-on: https://gerrit.libreoffice.org/30343 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-10-27coverity#1374319 Uninitialized pointer fieldCaolán McNamara
Change-Id: Ifc604753360f552512a5c9f9f9c42083a38e1a5f
2016-10-27make the AbstractDialog stuff extend from VclReferenceBaseNoel Grandin
Because some stuff wants to multiple-inherit from VclAbstractDialog and OutputDevice-subclasses, and we'd prefer to keep all the lifetime management through a single smart pointer class (VclPtr) The change in msgbox.cxx and window.cxx is to workaround a bug in VS2013 to do with virtual inheritance and delegating constructors. Change-Id: I178e8983b7d20a7d2790aa283be838dca5d14773 Reviewed-on: https://gerrit.libreoffice.org/29140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-26loplugin:expandablemethods in vclNoel Grandin
Change-Id: I1876e203d3a3a5fa36d83a9b282ba49429c1da2a Reviewed-on: https://gerrit.libreoffice.org/30261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-25Skip font formats not supported by CommonSalLayoutKhaled Hosny
Don’t list fonts we can’t handle, bad things would happen… Change-Id: Ic88486e34da69090deb3e8c394cb75a8e4e5cbd0
2016-10-25tdf#99723: target ratio must be reachedJulien Nabet
to be sure we can avoid decompressing/recompressing Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=76ec54e8c9f3580450bca85236a4f5af0c328588 Change-Id: Iacd7b2419ea85756f936b17f04c4e495d15e5b81 Reviewed-on: https://gerrit.libreoffice.org/30163 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-10-25no Control loaded from .src nowCaolán McNamara
Change-Id: I25af1187f7888ad3f8d7078e3b59d3e4a09b8ab5
2016-10-25remove now unused ImplLoadRes methodsCaolán McNamara
Change-Id: I8ff86fa847a74d48ccd06e8945beac9cf5653ab9
2016-10-25no raw Window is loaded from .src anymoreCaolán McNamara
Change-Id: I81e4bb23f4a819f59115cdf58afe19097b4ce68f
2016-10-25no FixedText loaded from .src nowCaolán McNamara
Change-Id: Ic377c5238e1763a2defdce72bbe893e826aae5ac
2016-10-25no PushButton loaded from .src nowCaolán McNamara
Change-Id: Ib866107995ab0496cf4f37a5e780458031d2fc25
2016-10-25no Edit controls loaded from .src nowCaolán McNamara
Change-Id: I42c7377c101c642ea39028e05e4ffd58fc7435d7
2016-10-25no ListBox loaded from .src nowCaolán McNamara
Change-Id: I7d30c38777f6a36c991271a3617d3f75c83cd490
2016-10-25Resolves: tdf#103472 gtk3 dnd must clear listener after dragDropEnd dispatchCaolán McNamara
like the generic dnd impl does Change-Id: Ie860c43329ee2f9332d12a53cd691ac7fcbb5eac
2016-10-25loplugin:staticmethodsStephan Bergmann
Change-Id: Id1a6184c3d3efab2d0ad921ee44b9b96ddddf74e
2016-10-24no FixedImage is loaded from .src anymoreCaolán McNamara
Change-Id: I7c5acd18b14822d6344af3709c6d8cfb343104ef
2016-10-24no ImageButton loaded from .src nowCaolán McNamara
Change-Id: If6f6718e1e6d756b99a499deafa4310c76a75ad3
2016-10-24implement VclVPaned and decripple formula panelCaolán McNamara
Change-Id: If87e481a5cf0ef34b469ac0440643b0a0e8a296c
2016-10-24impl. missing functionDavid Tardon
This is copied from vcl/unx/generic/glyphs/gcach_layout.cxx . Change-Id: I778c1c862c80668a06db8e91c11773ecc9916078