Commit Graph

35 Commits (4e6dca08797229d3a8dbaba6392e658bf3da7329)

Author SHA1 Message Date
Amy Rose 538dba0a02 refactor LayoutManager::save() to remove code repetition
Hey, first KDE contribution here. I was digging through code trying to fix [bug 427530](https://bugs.kde.org/show_bug.cgi?id=427530) when I found this copied-and-pasted block in LayoutManager::save(). This MR moves the block into a lambda to remove code repetition.

I am not a C++ programmer and although nothing changed that I could notice, it would be smart to sanity check and/or test this before merging.
3 years ago
Michail Vourlakos 59b422448b fix #100,introduce parabolic edge spacers for main
--new introduced external spacers of main layout are
used from parabolic effect in order to keep the contents
of main layout in balance. That produces a much better
visual result for the user because when the user hovers
an item, that item is zoomed and the mouse is still
present at first hovered position.
3 years ago
Rodrigo Pedra Brum 2b039e1275 Add const declarations on implementation files which use them as references
When trying to compile the new Multiple Screens feature released yesterday I got this error on KDE neon:

```bash
[ 83%] Building CXX object app/CMakeFiles/latte-dock.dir/lattedockadaptor.cpp.o
[ 84%] Linking CXX executable ../bin/latte-dock
/usr/bin/ld: CMakeFiles/latte-dock.dir/view/clonedview.cpp.o: in function `Latte::ClonedView::translateToClonesOrder(QList<int> const&)':
clonedview.cpp:(.text+0x1aaa): undefined reference to `Latte::ClonedView::ERRORAPPLETID'
collect2: error: ld returned 1 exit status
make[2]: *** [app/CMakeFiles/latte-dock.dir/build.make:2270: bin/latte-dock] Error 1
make[1]: *** [CMakeFiles/Makefile2:1806: app/CMakeFiles/latte-dock.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
```

After some research I found this StackOverflow answer:

https://stackoverflow.com/a/3026148

Which referenced this FAQ by Bjarne Stroustrup:

https://www.stroustrup.com/bs_faq2.html#in-class

In summary, if a `static const` is initialized in a class, and later is used as a reference in an implementation file, it should also be declared inside the implementation file. The initialization can live only inside the class.

Maybe the compiler used by @mvourlakos has an optimization to overcome such construct.

In my case by adding these two lines I could compile it on KDE neon (after fixing the first error, compilation failed on a second spot).
3 years ago
Michail Vourlakos 60095bba3b fix #96,FEATURE:AllScreens and AllSecondaryScreens
--This is a HUGE FEATURE and so important for multi-screens
users. It is introduced as one single commit because it
reimplements plenty of infrastructure changes and it will
be easier to identify newly introduced bugs.
--Users can now choose for their docks and panels to belong
at various screen groups. The first two screen groups introduced
are AllScreens and AllSecondayScreens. In the future it might
be possible to provide CustomScreensGroup that the user will
be able to define specific screens in which a dock or panel
should be always present.
--Current solution specifies an Original dock or panel and clones/copies
itself automatically to other screens. So docks and panels in other screens
are just real docks and panels that reference themselves to original
docks and panels.
--Clones are destroyed during layout startup and are automaticaly
recreated. It is suggested to export your layouts through the
official Layouts Editor in order to share them because in that case
clones are not included in the new generated layout file. If in any
case you do not this and you share your layout with any previous
versions then your clones will just appear as separate docks and
panels that belong to specific screens.
--Automatic syncing was introduced in order to keep up-to-date
the configuration of Original docks and panels with their referenced
Clones.
--Automatic syncing currently works for all docks and panels settings,
for all normal applets configurations and for all subcontaiments
configuration such as systrays.
--Automatic syncing does not work for applets inside subcontainments
such as Group Plasmoid. In such case it is suggested to configure
your applets inside your Group Plasmoid in the original dock or panel
and afterwards to trigger a recreation for the relevant clones
--Manual recreation of clones is easily possible by just choosing
the dock or panel to be OnPrimary or OnSpecificScreen and rechoosing
afterwards the AllScreensGroup or AllSecondaryScreensGroup
3 years ago
Michail Vourlakos a36a228938 provide colors Layout Colors option 4 years ago
Alexander Lohnau 505379ed04 Use spdx syntax for all files 4 years ago
Michail Vourlakos 518445027d containment:enable startUp flag from layout manager 4 years ago
Michail Vourlakos 926593aa76 fix where dropped applets are added
--the new code is more consistent and calculates the
appropriate place to add an applet much better
based on the distance that dropped applet is
having with each layout.
4 years ago
Michail Vourlakos 8d0c26a2e1 provide Dark/Light Colors options
--this way a layout designer can force to its users
the desired color palette for each dock and panel.

BeCareful: designers should be very careful with this
because they take responsibility to disable latte auto-coloring
at per-applet basis in order for chromatic applets to NOT
be autocolored from latte because they already provide enough
contrast.

BUG:435714
4 years ago
Michail Vourlakos d6bf586ba7 fix crash from using Applet Alternatives option 4 years ago
Michail Vourlakos 83bdbced35 remove no needed variable 4 years ago
Michail Vourlakos 1805e11131 disable some debug messages 4 years ago
Michail Vourlakos 3185a70b9a more functionality for FastLayoutManager
--provide addAppletItem function
--provide reorderSplitters in Start and End
layouts when an applet is added in them and
the splitters are moving in faulty position
4 years ago
Michail Vourlakos 62efa97e61 plenty of fixes for FastLayoutManager
--remove also the deprecated javascript LayoutManager
4 years ago
Michail Vourlakos f9d400fa4a provide fastLayoutManager save options 4 years ago
Michail Vourlakos a5b19284b0 provide restoreOptions and userBlocksColoring 4 years ago
Michail Vourlakos 5c29dcc1e0 fastLayoutManager add lockedZoomApplets property 4 years ago
Michail Vourlakos 98e89d6e39 drop lastSpacer and fix addsplitters 4 years ago
Michail Vourlakos 177f8f9b39 add FastLayoutManager.addJustifySplittersInMain 4 years ago
Michail Vourlakos d8240528ee provide fastLayoutManager.destroyJustifySplitter() 4 years ago
Michail Vourlakos e36c8557d0 fixes for applets order during startup
--when an applet is not loaded properly is removed
from its registered order
--when an applet is loaded properly but is not found
in the registered order is at in the end of the stack
4 years ago
Michail Vourlakos b6112c2ab8 provide FastLayoutManager save() function 4 years ago
Michail Vourlakos f61846c6ae expose dndSpacer to fastLayoutManager 4 years ago
Michail Vourlakos 2d812552b1 provide fastLayoutManager.joinLayoutsToMainLayout 4 years ago
Michail Vourlakos 5295dc9ae9 fixes for FastLayoutManager.insertAtCoordinates
--consider start and end layouts only when the alignment
is set to Justify
4 years ago
Michail Vourlakos 15cf2b2b5f replace more functions with fastLayoutManager 4 years ago
Michail Vourlakos d61d074f97 improve moving around an applet
--fast layout manager takes resposibility
for reparent procedures during moving an applet
at different position
4 years ago
Michail Vourlakos f1732be8c3 provide insertAtCoordinates at fastLayoutManager 4 years ago
Michail Vourlakos f6df7a7df1 introduc fast layout manager for containment 4 years ago
Michail Vourlakos 790e0af406 add Containment.ThemeColorsGroup enum 5 years ago
Michail Vourlakos 1bc14b5d7a add Containment.ThemeColorsGroup 5 years ago
Michail Vourlakos 35d09789c9 add Containment.ShadowColorGroup qml enum 5 years ago
Michail Vourlakos 39fbf728d5 rename actions for LatteContainment.scrollActions 5 years ago
Michail Vourlakos a4e9b51b2b support LatteContaiment.ActiveWindowFilterGroup 5 years ago
Michail Vourlakos ac99708315 MAJOR MAJOR:splitting types to their own component
--improve types and references and add types splitted
at better places. So now we have
 - LatteCore.Types that are global for all components
 - LatteTasks.Types that are private to tasks plasmoid
 - LatteContainment.Types that are private to latte
containment
5 years ago