sculpt: make hovering build-time configurable

This way, we can disable the visual hovering at one place for the phone
version.
This commit is contained in:
Norman Feske 2023-04-25 16:40:23 +02:00 committed by Christian Helmuth
parent 105b3cd21d
commit 83d0214099
2 changed files with 6 additions and 1 deletions

View File

@ -29,6 +29,9 @@ struct Sculpt::Feature
/* allow the browsing of file systems via the inspect view */ /* allow the browsing of file systems via the inspect view */
static constexpr bool INSPECT_VIEW = true; static constexpr bool INSPECT_VIEW = true;
/* highlight hovered buttons, not possible on touch-screen devices */
static constexpr bool VISUAL_HOVER = true;
}; };
#endif /* _FEATURE_H_ */ #endif /* _FEATURE_H_ */

View File

@ -14,6 +14,7 @@
#ifndef _VIEW__HOVERABLE_ITEM_H_ #ifndef _VIEW__HOVERABLE_ITEM_H_
#define _VIEW__HOVERABLE_ITEM_H_ #define _VIEW__HOVERABLE_ITEM_H_
#include <feature.h>
#include "types.h" #include "types.h"
#include "xml.h" #include "xml.h"
@ -51,7 +52,8 @@ struct Sculpt::Hoverable_item
*/ */
void gen_hovered_attr(Xml_generator &xml, Id const &id) const void gen_hovered_attr(Xml_generator &xml, Id const &id) const
{ {
if (hovered(id)) xml.attribute("hovered", "yes"); if (Feature::VISUAL_HOVER && hovered(id))
xml.attribute("hovered", "yes");
} }
/** /**