-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add new plugin 'Object visibility' #4933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # This is the cmake config file for the Object Visibility plugin | ||
| SET(OBJECTVISIBILITY_VERSION "${VERSION}") | ||
| ADD_DEFINITIONS(-DOBJECTVISIBILITY_PLUGIN_VERSION="${OBJECTVISIBILITY_VERSION}") | ||
| ADD_DEFINITIONS(-DOBJECTVISIBILITY_PLUGIN_LICENSE="GNU GPLv2 or later") | ||
|
|
||
| ADD_SUBDIRECTORY( src ) | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <RCC> | ||
| <qresource prefix="/ObjectVisibility"> | ||
| <file>bt_object_visibility_on.png</file> | ||
| <file>bt_object_visibility_off.png</file> | ||
| </qresource> | ||
| </RCC> |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be better if the lines were antialiased. Ideally, the source should be in SVG format (and stored in the repo as for all the other buttons). And the enabled version of the icon should glow, see the others. How to do this is explained in the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be fixed now, please have a look.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, took quite a bit for me to figure out why it doesn't work in Inkscape from Ubuntu 22.04. How did you create it? The following patch makes it more compatible (though Geeqie still fails to understand it): diff --git a/plugins/ObjectVisibility/icons.svg b/plugins/ObjectVisibility/icons.svg
index 8edb6017ad..1e78bf983c 100644
--- a/plugins/ObjectVisibility/icons.svg
+++ b/plugins/ObjectVisibility/icons.svg
@@ -29,6 +29,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
width="160"
height="160"
viewBox="0 0 32 32"
@@ -110,7 +111,7 @@
id="off"
stroke="#6d6d6d" fill="none"
opacity="0.7">
- <use href="#iconShape" />
+ <use xlink:href="#iconShape" />
</g>
<!-- ===== Layer: on (active state) =====
@@ -124,11 +125,11 @@
id="on">
<!-- Soft halo: same shape, passed through the glow filter. -->
<g stroke="#ffffff" fill="none" filter="url(#glow)">
- <use href="#iconShape" />
+ <use xlink:href="#iconShape" />
</g>
<!-- Crisp white icon on top of the halo. -->
<g stroke="#ffffff" fill="none">
- <use href="#iconShape" />
+ <use xlink:href="#iconShape" />
</g>
</g>
</svg>And also, how did you add the comments?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I generated the icon with Claude AI with Equation of Time icon as a reference, I thought that would solve it. I guess that could have lead to incompatibilities across OS's. Should I recreate it, or is your patch enough to cover the problem?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, this explains a lot. This actual icon doesn't even resemble that of Equation of Time in structure. I guess it might be OK for now, but if you could just take the shapes from this SVG, replace with them those in the icon of Equation of Time, and save in place of this one, it would be much easier for the future developers who may need to edit it. And an unrelated question: was the C++ code of this PR also created with the help of AI?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it was, otherwise I would have never been able to create it. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| INCLUDE_DIRECTORIES(. gui) | ||
| LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/src) | ||
|
|
||
| SET(ObjectVisibility_SRCS | ||
| ObjectVisibility.hpp | ||
| ObjectVisibility.cpp | ||
| ) | ||
| IF (STELLARIUM_GUI_MODE STREQUAL "Standard") | ||
| LIST(APPEND ObjectVisibility_SRCS | ||
| gui/ObjectVisibilityDialog.hpp | ||
| gui/ObjectVisibilityDialog.cpp | ||
| gui/ObjectVisibilityMapWidget.hpp | ||
| gui/ObjectVisibilityMapWidget.cpp | ||
| ) | ||
|
|
||
| SET(ObjectVisibility_UIS | ||
| gui/objectVisibilityDialog.ui | ||
| ) | ||
| ENDIF (STELLARIUM_GUI_MODE STREQUAL "Standard") | ||
|
|
||
| ################# compiles resources files ############ | ||
| SET(ObjectVisibility_RES ../ObjectVisibility.qrc) | ||
| IF (${QT_VERSION_MAJOR} EQUAL "5") | ||
| IF (STELLARIUM_GUI_MODE STREQUAL "Standard") | ||
| QT5_WRAP_UI(ObjectVisibility_UIS_H ${ObjectVisibility_UIS}) | ||
| ENDIF() | ||
| QT5_ADD_RESOURCES(ObjectVisibility_RES_CXX ${ObjectVisibility_RES}) | ||
| ELSE() | ||
| IF (STELLARIUM_GUI_MODE STREQUAL "Standard") | ||
| QT_WRAP_UI(ObjectVisibility_UIS_H ${ObjectVisibility_UIS}) | ||
| ENDIF() | ||
| QT_ADD_RESOURCES(ObjectVisibility_RES_CXX ${ObjectVisibility_RES}) | ||
| ENDIF() | ||
|
|
||
| ADD_LIBRARY(ObjectVisibility-static STATIC | ||
| ${ObjectVisibility_SRCS} | ||
| ${ObjectVisibility_RES_CXX} | ||
| ${ObjectVisibility_UIS_H}) | ||
|
|
||
| TARGET_LINK_LIBRARIES(ObjectVisibility-static | ||
| Qt${QT_VERSION_MAJOR}::Core | ||
| Qt${QT_VERSION_MAJOR}::Widgets | ||
| Qt${QT_VERSION_MAJOR}::OpenGL) | ||
|
|
||
| SET_TARGET_PROPERTIES(ObjectVisibility-static PROPERTIES | ||
| OUTPUT_NAME "ObjectVisibility") | ||
| SET_TARGET_PROPERTIES(ObjectVisibility-static PROPERTIES | ||
| COMPILE_FLAGS "-DQT_STATICPLUGIN") | ||
| ADD_DEPENDENCIES(AllStaticPlugins ObjectVisibility-static) | ||
|
|
||
| SET_TARGET_PROPERTIES(ObjectVisibility-static PROPERTIES | ||
| FOLDER "plugins/ObjectVisibility") |
Uh oh!
There was an error while loading. Please reload this page.