Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-03-19 19:38:35 +0300
committerHans Goudey <h.goudey@me.com>2021-03-19 19:38:35 +0300
commitae51cde3d783b1cec848dd8f78f3b91d85e90d8d (patch)
tree3833b6b1e5ffee549c58fbc9e8448357555c1bf6 /source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh
parent25f80508300b1a220cb5907f7eb4ab8c587c4032 (diff)
Larger width for name column, use values for object and collection specifically
Diffstat (limited to 'source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh')
-rw-r--r--source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh20
1 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh b/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh
index b36689760ed..85217d35289 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.hh
@@ -20,11 +20,19 @@
#include "spreadsheet_draw.hh"
+// struct Object;
+// struct Collection;
+#include "DNA_collection_types.h"
+#include "DNA_object_types.h"
+
namespace blender::ed::spreadsheet {
-struct IconText {
- int icon_id;
- StringRefNull string;
+struct ObjectCellValue {
+ const Object *object;
+};
+
+struct CollectionCellValue {
+ const Collection *collection;
};
/**
@@ -35,7 +43,8 @@ class CellValue {
public:
/* The implementation just uses a `std::variant` for simplicity. It can be encapsulated better,
* but it's not really worth the complixity for now. */
- using VariantType = std::variant<std::monostate, int, float, bool, IconText>;
+ using VariantType =
+ std::variant<std::monostate, int, float, bool, ObjectCellValue, CollectionCellValue>;
VariantType value;
};
@@ -61,6 +70,9 @@ class SpreadsheetColumn {
{
return name_;
}
+
+ /* The default width of newly created columns, in UI units. */
+ float default_width = 0.0f;
};
/* Utility class for the function below. */