Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as one that does not. Moving it to Base opens possibilities to integrate it better with the rest of FreeCAD.
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
#include <Base/Tools.h>
|
||||
#include <Base/Writer.h>
|
||||
|
||||
#include <App/Color.h>
|
||||
#include <Base/Color.h>
|
||||
#include <App/Document.h>
|
||||
#include <App/DocumentObjectGroup.h>
|
||||
#include <App/AutoTransaction.h>
|
||||
@@ -109,7 +109,7 @@ static bool isSelectionCheckBoxesEnabled() {
|
||||
void TreeParams::onItemBackgroundChanged()
|
||||
{
|
||||
if (getItemBackground()) {
|
||||
App::Color color;
|
||||
Base::Color color;
|
||||
color.setPackedValue(getItemBackground());
|
||||
QColor col;
|
||||
col.setRedF(color.r);
|
||||
@@ -3812,7 +3812,7 @@ void DocumentItem::slotInEdit(const Gui::ViewProviderDocumentObject& v)
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/TreeView");
|
||||
unsigned long col = hGrp->GetUnsigned("TreeEditColor", 563609599);
|
||||
QColor color(App::Color::fromPackedRGB<QColor>(col));
|
||||
QColor color(Base::Color::fromPackedRGB<QColor>(col));
|
||||
|
||||
if (!getTree()->editingItem) {
|
||||
auto doc = Application::Instance->editDocument();
|
||||
@@ -5255,7 +5255,7 @@ void DocumentObjectItem::setHighlight(bool set, Gui::HighlightMode high) {
|
||||
f.setOverline(overlined);
|
||||
|
||||
unsigned long col = hGrp->GetUnsigned("TreeActiveColor", 1538528255);
|
||||
color = App::Color::fromPackedRGB<QColor>(col);
|
||||
color = Base::Color::fromPackedRGB<QColor>(col);
|
||||
}
|
||||
else {
|
||||
f.setBold(false);
|
||||
|
||||
Reference in New Issue
Block a user