Previously, only transforms were saved -- not positions (which are set
if a group is moved by dragging it directly; if dragged by its frame,
its transform is updated instead).
Issue observed was that a group that had been moved would lose its new
position when the document was saved then loaded. (All other transforms
were kept, however).
Now, when duplicating a group before saving a document, position is
included in the group's transform.
This was observed in some cases on low-resolution screens, at least on
Linux and Windows.
The previously hardcoded value for the width of the text items' titlebar
(consisting of the buttons for formatting text) was replaced by a
method calculating its width (which varies based on screen resolution).
... to the nearest 2 decimal places. This fixes a bug where upon loading
a text item, it could be scaled by e.g 0.999999, which would eventually
round down the point size by 1pt. Making the text item shrink by 1pt
every time the document was opened.
Fixed issue that appeared with previous commit, where grouped strokes'
positions were sometimes saved and loaded incorrectly.
Strokes and their transforms should now be saved correctly whether they
are grouped or not
Solves issue where items (other than strokes) that had been grouped then
moved (and/or rotated) lost their new position after saving and loading
the document.
- Selecting multiple media items then grouping them didn't behave as it
should for other items => fixed by adding type tests
- A group containing several media items wasn't saved to SVG with those media
items as children, due to incorrect UUID copying in the mediaItems's
deepCopy() methods
The same font, in the same point size, can be displayed differently
depending on platform (this is a Qt limitation). This can lead to text
items being the wrong size when importing a document created on a
different computer.
As a workaround, when saving a text item to SVG, the size of 1pt in
pixels is calculated and saved. Upon loading, this value is calculated
again and, if it is different from the saved value, the text item is
scaled accordingly.
Thus, any document created from this version onward will have
correctly-scaled text boxes. If an old document (not containing a
pixel-per-point attribute for text items) is loaded, the scene is marked
as modified to make sure that all text items are then saved with the
pixels-per-point value (even if the document is not edited). This allows
old documents to be "fixed" by simply opening them once from a new
version of OpenBoard.
save text item font size in pixels, and scale it on load
fixed loading of text item pixel height
Save and load pixels-per-point rather than text pixel height
Upon loading a text item from SVG, make sure that it will be saved with a pixel-per-point value
This allows users to change the color of the background grid e.g if they
are using a projector or other low-contrast display.
The settings are in the `Board` category and are named `CrossColorDarkBackground`
and `CrossColorLightBackground`. They take strings representing the
color in any of the following formats:
- #RGB (Hexadecimal digits)
- #RRGGBB
- #AARRGGBB
- #RRRGGGBBB
- #RRRRGGGGBBBB
- Any SVG color keyword name (as defined by W3C)
This prevents a bug where a simplified stroke (containing only one
polygon) was incorrectly saved as a polyline, which meant the stroke was
lost when the document was loaded.
Up until now, the fill rule of a polygon was always saved as even-odd,
despite the fact that in most if not all cases, polygons are drawn with
winding fill within OpenBoard.
Saving is now fixed, but there is no way to know upon loading whether
the polygon was correctly saved or whether; so for now, we just set the
fill rule to Winding when loading a polygon.
If enabled in the preferences menu, pen and marker strokes will be
replaced by a simplified stroke after they are drawn.
The algorithm is very basic (for now): if three points are almost lined
up (the threshold angle can be specified in the config file), then the
middle one is removed. This is repeated over the whole stroke; new
polygons are then generated based on the simplified stroke points.
This typically cuts down on number of points and polygons by a factor of
about 10, while having minimal visual impact.
Due to antialiasing, adjacent polygons are separated by a very fine
space. The previous solution attempted to hide this by adding a border
to the polygons. The border of adjacent polygons would overlap, which
was visible (despite the attempted color correction) and, more
importantly, caused massive lags especially on Linux.
Therefore it has been removed but feel free to revert this commit some
day and try to fix this more cleanly.
Several issues remain with multi-screen mode on Linux. The behavior is
inconsistent from one desktop evironment to the next, making it hard to
work around these problems. Among the known issues at this stage:
On Ubuntu 14.04, a call to QWidget::setGeometry requires the widget to
be hidden on KDE, but visible on MATE, for the geometry changes to take
effect.
Despite the widget's geometry being updated by this call, the windows
aren't necessarily moved. Meaning that the control and display widgets
will tend to be displayed on the same monitor, even though their
positions are correctly set to different areas on the extended screen.
In the current state, this behavior is observed on MATE. Unity works
fine and KDE only has transient positioning issues (for example,
swapping control and display windows in multi-screen mode leads to both
windows being placed on the same monitor, until multi-screen mode is
turned off then on again).
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch dev
# Your branch is ahead of 'origin/dev' by 29 commits.
# (use "git push" to publish your local commits)
#
# Changes to be committed:
# modified: src/core/UBApplicationController.cpp
# modified: src/core/UBDisplayManager.cpp
# modified: src/core/UBDisplayManager.h
#
# Changes not staged for commit:
# modified: release_scripts/linux/build.sh
# modified: release_scripts/linux/package.sh
#
# Untracked files:
# release_scripts/linux/generateDependencies.sh
#