Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ IF (STELLARIUM_GUI_MODE STREQUAL "Standard")
ADD_PLUGIN(SkyCultureMaker 1)
ADD_PLUGIN(SolarSystemEditor 1)
ADD_PLUGIN(TimeNavigator 1)
ADD_PLUGIN(ObjectVisibility 1)
ENDIF()

ADD_PLUGIN(Vts 0)
Expand Down
6 changes: 6 additions & 0 deletions plugins/ObjectVisibility/CMakeLists.txt
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}")
Comment thread
Atque marked this conversation as resolved.
ADD_DEFINITIONS(-DOBJECTVISIBILITY_PLUGIN_VERSION="${OBJECTVISIBILITY_VERSION}")
ADD_DEFINITIONS(-DOBJECTVISIBILITY_PLUGIN_LICENSE="GNU GPLv2 or later")

ADD_SUBDIRECTORY( src )
340 changes: 340 additions & 0 deletions plugins/ObjectVisibility/COPYING

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions plugins/ObjectVisibility/ObjectVisibility.qrc
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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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 documentation layer of data/gui/icons.svg (at least I can see it if I open the file in Inkscape).

@Atque Atque May 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now, please have a look.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
134 changes: 134 additions & 0 deletions plugins/ObjectVisibility/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions plugins/ObjectVisibility/src/CMakeLists.txt
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")
Loading
Loading