diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-checked-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-checked-disabled.svg
new file mode 100644
index 0000000000..98e9e84ddc
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-checked-disabled.svg
@@ -0,0 +1,73 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-checked-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-checked-hover.svg
new file mode 100644
index 0000000000..f6d25601d7
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-checked-hover.svg
@@ -0,0 +1,73 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-checked.svg b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-checked.svg
new file mode 100644
index 0000000000..27e196fdf1
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-checked.svg
@@ -0,0 +1,73 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-unchecked-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-unchecked-disabled.svg
new file mode 100644
index 0000000000..d11ac819ea
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-unchecked-disabled.svg
@@ -0,0 +1,66 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-unchecked-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-unchecked-hover.svg
new file mode 100644
index 0000000000..d7f5f29136
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-unchecked-hover.svg
@@ -0,0 +1,66 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-unchecked.svg b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-unchecked.svg
new file mode 100644
index 0000000000..1043e7d738
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox-unchecked.svg
@@ -0,0 +1,66 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_checked.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_checked.png
deleted file mode 100644
index 09d90bf70c..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_checked.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_checked_disabled.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_checked_disabled.png
deleted file mode 100644
index 2ab8693c08..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_checked_disabled.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_unchecked.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_unchecked.png
deleted file mode 100644
index 073c4a6543..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_unchecked.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_unchecked_disabled.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_unchecked_disabled.png
deleted file mode 100644
index c4fa06c6e3..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_big_unchecked_disabled.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_checked.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_checked.png
deleted file mode 100644
index 31e3ea9f18..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_checked.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_checked_disabled.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_checked_disabled.png
deleted file mode 100644
index 0658f46961..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_checked_disabled.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_checked_focus.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_checked_focus.png
deleted file mode 100644
index d7279dd4d4..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_checked_focus.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_indeterminate.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_indeterminate.png
deleted file mode 100644
index e53980442d..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_indeterminate.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_indeterminate_disabled.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_indeterminate_disabled.png
deleted file mode 100644
index b7ac500eb5..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_indeterminate_disabled.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_indeterminate_focus.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_indeterminate_focus.png
deleted file mode 100644
index 0bf39f8013..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_indeterminate_focus.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_unchecked.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_unchecked.png
deleted file mode 100644
index e138b2c791..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_unchecked.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_unchecked_disabled.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_unchecked_disabled.png
deleted file mode 100644
index 3e252c9cec..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_unchecked_disabled.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_unchecked_focus.png b/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_unchecked_focus.png
deleted file mode 100644
index 34b967e461..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/checkbox_unchecked_focus.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow-disabled.svg
new file mode 100644
index 0000000000..7465135a75
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow-disabled.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow-hover.svg
new file mode 100644
index 0000000000..6a6ef6eb14
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow-hover.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow-pressed.svg b/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow-pressed.svg
new file mode 100644
index 0000000000..064ca7f26d
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow-pressed.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow.svg b/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow.svg
new file mode 100644
index 0000000000..be0ffe6d52
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/down-arrow.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/down_arrow.png b/Plugins/org.blueberry.ui.qt/resources/dark/down_arrow.png
deleted file mode 100644
index 087ae48c07..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/down_arrow.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/down_arrow_disabled.png b/Plugins/org.blueberry.ui.qt/resources/dark/down_arrow_disabled.png
deleted file mode 100644
index 2208c9dfe1..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/down_arrow_disabled.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow-disabled.svg
new file mode 100644
index 0000000000..4538b9dda3
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow-disabled.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow-hover.svg
new file mode 100644
index 0000000000..5b171ac4e4
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow-hover.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow-pressed.svg b/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow-pressed.svg
new file mode 100644
index 0000000000..582895c429
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow-pressed.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow.svg b/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow.svg
new file mode 100644
index 0000000000..4393253b1c
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/left-arrow.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/left_arrow.png b/Plugins/org.blueberry.ui.qt/resources/dark/left_arrow.png
deleted file mode 100644
index 0c0abbebfc..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/left_arrow.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/left_arrow_disabled.png b/Plugins/org.blueberry.ui.qt/resources/dark/left_arrow_disabled.png
deleted file mode 100644
index 4cf564c5a6..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/left_arrow_disabled.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radio_checked.png b/Plugins/org.blueberry.ui.qt/resources/dark/radio_checked.png
deleted file mode 100644
index 47f9d2f68f..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/radio_checked.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radio_checked_disabled.png b/Plugins/org.blueberry.ui.qt/resources/dark/radio_checked_disabled.png
deleted file mode 100644
index 90a50a6d64..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/radio_checked_disabled.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radio_checked_focus.png b/Plugins/org.blueberry.ui.qt/resources/dark/radio_checked_focus.png
deleted file mode 100644
index 75ff2b60c7..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/radio_checked_focus.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radio_unchecked.png b/Plugins/org.blueberry.ui.qt/resources/dark/radio_unchecked.png
deleted file mode 100644
index 0ad602bad2..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/radio_unchecked.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radio_unchecked_disabled.png b/Plugins/org.blueberry.ui.qt/resources/dark/radio_unchecked_disabled.png
deleted file mode 100644
index 8f1d2ae9f4..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/radio_unchecked_disabled.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radio_unchecked_focus.png b/Plugins/org.blueberry.ui.qt/resources/dark/radio_unchecked_focus.png
deleted file mode 100644
index f5a516447a..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/radio_unchecked_focus.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-checked-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-checked-disabled.svg
new file mode 100644
index 0000000000..c1f5c41856
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-checked-disabled.svg
@@ -0,0 +1,71 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-checked-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-checked-hover.svg
new file mode 100644
index 0000000000..abfc3ed08e
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-checked-hover.svg
@@ -0,0 +1,71 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-checked.svg b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-checked.svg
new file mode 100644
index 0000000000..ccd2e09033
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-checked.svg
@@ -0,0 +1,71 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-unchecked-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-unchecked-disabled.svg
new file mode 100644
index 0000000000..15defc0bb6
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-unchecked-disabled.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-unchecked-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-unchecked-hover.svg
new file mode 100644
index 0000000000..5eb3262ba3
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-unchecked-hover.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-unchecked.svg b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-unchecked.svg
new file mode 100644
index 0000000000..3994a5e3af
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/radiobutton-unchecked.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow-disabled.svg
new file mode 100644
index 0000000000..4819694569
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow-disabled.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow-hover.svg
new file mode 100644
index 0000000000..f5458f4221
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow-hover.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow-pressed.svg b/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow-pressed.svg
new file mode 100644
index 0000000000..6e34a9aef9
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow-pressed.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow.svg b/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow.svg
new file mode 100644
index 0000000000..27aa667c18
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/right-arrow.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/right_arrow.png b/Plugins/org.blueberry.ui.qt/resources/dark/right_arrow.png
deleted file mode 100644
index 7dc5d3b1df..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/right_arrow.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/right_arrow_disabled.png b/Plugins/org.blueberry.ui.qt/resources/dark/right_arrow_disabled.png
deleted file mode 100644
index 6f3be3484a..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/right_arrow_disabled.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow-disabled.svg
new file mode 100644
index 0000000000..bb108fa4c3
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow-disabled.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow-hover.svg
new file mode 100644
index 0000000000..789fae44de
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow-hover.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow-pressed.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow-pressed.svg
new file mode 100644
index 0000000000..6d70f8086a
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow-pressed.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow.svg
new file mode 100644
index 0000000000..4bec9ad685
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-down-arrow.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow-disabled.svg
new file mode 100644
index 0000000000..89ab4bc543
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow-disabled.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow-hover.svg
new file mode 100644
index 0000000000..6b0a94a43a
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow-hover.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow-pressed.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow-pressed.svg
new file mode 100644
index 0000000000..17346407cb
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow-pressed.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow.svg
new file mode 100644
index 0000000000..b9f4a29521
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-left-arrow.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-disabled.svg
new file mode 100644
index 0000000000..b5ff557521
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-disabled.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-hover.svg
new file mode 100644
index 0000000000..d1c97d35f7
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-hover.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-pressed.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-pressed.svg
new file mode 100644
index 0000000000..3f4053034e
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-pressed.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-textcolor.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-textcolor.svg
new file mode 100644
index 0000000000..ed3054da50
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow-textcolor.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow.svg
new file mode 100644
index 0000000000..a19166f165
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-right-arrow.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow-disabled.svg
new file mode 100644
index 0000000000..dee5eec96e
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow-disabled.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow-hover.svg
new file mode 100644
index 0000000000..50c41cfe46
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow-hover.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow-pressed.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow-pressed.svg
new file mode 100644
index 0000000000..2f2660c0ce
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow-pressed.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow.svg b/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow.svg
new file mode 100644
index 0000000000..4f7068fedd
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/tight-up-arrow.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow-disabled.svg b/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow-disabled.svg
new file mode 100644
index 0000000000..65dc0bfd08
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow-disabled.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow-hover.svg b/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow-hover.svg
new file mode 100644
index 0000000000..7792aabb54
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow-hover.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow-pressed.svg b/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow-pressed.svg
new file mode 100644
index 0000000000..284d7a4231
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow-pressed.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow.svg b/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow.svg
new file mode 100644
index 0000000000..9ccaa8ed85
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/dark/up-arrow.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/up_arrow.png b/Plugins/org.blueberry.ui.qt/resources/dark/up_arrow.png
deleted file mode 100644
index adb5e0a630..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/up_arrow.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/dark/up_arrow_disabled.png b/Plugins/org.blueberry.ui.qt/resources/dark/up_arrow_disabled.png
deleted file mode 100644
index 6c876f55d5..0000000000
Binary files a/Plugins/org.blueberry.ui.qt/resources/dark/up_arrow_disabled.png and /dev/null differ
diff --git a/Plugins/org.blueberry.ui.qt/resources/darkstyle-activetab.qss b/Plugins/org.blueberry.ui.qt/resources/darkstyle-activetab.qss
index 23b645f456..bc47db2d10 100644
--- a/Plugins/org.blueberry.ui.qt/resources/darkstyle-activetab.qss
+++ b/Plugins/org.blueberry.ui.qt/resources/darkstyle-activetab.qss
@@ -1,26 +1,8 @@
-berry--QCTabBar::tab:selected
-{
- background: #3399cc;
- color: #1d1d1c;
- font-weight :normal;
- border: 0px;
+berry--QCTabBar::tab:selected {
+ background-color: #1c97ea;
+ border: 1px solid #1c97ea;
}
-berry--QCTabBar QToolButton#TabCloseButton
-{
- border: none;
- background-color: transparent;
- width: 12px;
- height: 12px;
-}
-
-berry--QCTabBar QToolButton
-{
- border: none;
- max-height: 32px;
-}
-
-QFrame#ViewFormContentFrame
-{
- border: 1px solid #3399cc
+#ViewFormContentFrame {
+ border: 1px solid #1c97ea;
}
diff --git a/Plugins/org.blueberry.ui.qt/resources/darkstyle-tab.qss b/Plugins/org.blueberry.ui.qt/resources/darkstyle-tab.qss
index 99f534d58d..2ddea690f8 100644
--- a/Plugins/org.blueberry.ui.qt/resources/darkstyle-tab.qss
+++ b/Plugins/org.blueberry.ui.qt/resources/darkstyle-tab.qss
@@ -1,31 +1,8 @@
-berry--QCTabBar::tab:selected
-{
- background: #323231;
- color: #adb1b6;
- border: 0px;
+berry--QCTabBar::tab:selected {
+ background-color: #434346;
+ border: 1px solid #434346;
}
-berry--QCTabBar::tab:selected:hover
-{
- color: #3399cc;
- border: 0px;
-}
-
-QFrame#ViewFormContentFrame
-{
- border: 1px solid #1d1d1c;
-}
-
-berry--QCTabBar QToolButton
-{
- border: none;
- max-height: 32px;
-}
-
-berry--QCTabBar QToolButton#TabCloseButton
-{
- border: none;
- background-color: transparent;
- width: 12px;
- height: 12px;
+#ViewFormContentFrame {
+ border: 1px solid #434346;
}
diff --git a/Plugins/org.blueberry.ui.qt/resources/darkstyle.qss b/Plugins/org.blueberry.ui.qt/resources/darkstyle.qss
index f936c54999..0401c21c32 100644
--- a/Plugins/org.blueberry.ui.qt/resources/darkstyle.qss
+++ b/Plugins/org.blueberry.ui.qt/resources/darkstyle.qss
@@ -1,1485 +1,576 @@
/*===================================================================
BlueBerry Platform
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) <2013-2014>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
-
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
-
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
/*
- foregroundColor = #adb1b6
- iconColor = #adb1b6 <- This line is parsed by MITK
- iconAccentColor = #db7039 <- This line is parsed by MITK
- backgroundColor = #323231
- inactiveColor = #1d1d1c
- highlightColor = #3399cc
- popupColor = #027c90
- warningColor = #ffb400
- borderColor = #1d1d1c
+ iconColor = #c7c7c7 <- This line is parsed by MITK
+ iconAccentColor = #d4821e <- This line is parsed by MITK
*/
-QToolTip
-{
- border: 1px solid #1d1d1c;
- background-color: #323231;
- color: #adb1b6;
- padding: 3px;
- opacity: 200;
-}
-
-QWidget
-{
- color: #adb1b6;
- background-color: #323231;
- selection-background-color: #3399cc;
- selection-color: #1d1d1c;
- background-clip: border;
- border-image: none;
- border: 0px transparent #1d1d1c;
- outline: 0;
-}
-
-QWidget:item:hover
-{
- background-color: #3399cc;
- color: #adb1b6;
-}
-
-QWidget:item:selected
-{
- background-color: #3399cc;
-}
-
-QCheckBox
-{
- spacing: 5px;
- outline: none;
- color: #adb1b6;
- margin-bottom: 2px;
-}
-
-QCheckBox:disabled
-{
- color: #1d1d1c;
-}
-
-QCheckBox::indicator,
-QGroupBox::indicator
-{
- width: 18px;
- height: 30px;
-}
-QGroupBox::indicator
-{
- margin-left: 0px;
-}
-
-QCheckBox::indicator:unchecked
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_unchecked.png);
-}
-
-QCheckBox::indicator:unchecked:hover,
-QCheckBox::indicator:unchecked:focus,
-QCheckBox::indicator:unchecked:pressed,
-QGroupBox::indicator:unchecked:hover,
-QGroupBox::indicator:unchecked:focus,
-QGroupBox::indicator:unchecked:pressed
-{
- border: none;
- image: url(:/org.blueberry.ui.qt/dark/checkbox_unchecked_focus.png);
-}
-
-QCheckBox::indicator:checked
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_checked.png);
-}
-
-QCheckBox::indicator:checked:hover,
-QCheckBox::indicator:checked:focus,
-QCheckBox::indicator:checked:pressed,
-QGroupBox::indicator:checked:hover,
-QGroupBox::indicator:checked:focus,
-QGroupBox::indicator:checked:pressed
-{
+QWidget {
+ background-color: #2d2d30;
border: none;
- image: url(:/org.blueberry.ui.qt/dark/checkbox_checked_focus.png);
+ color: #f1f1f1;
}
-
-QCheckBox::indicator:indeterminate
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_indeterminate.png);
+QWidget:disabled {
+ background-color: #2d2d30;
+ border-color: #434346;
+ color: #656565;
}
-QCheckBox::indicator:indeterminate:focus,
-QCheckBox::indicator:indeterminate:hover,
-QCheckBox::indicator:indeterminate:pressed
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_indeterminate_focus.png);
+QAbstractButton:hover, QComboBox:hover, QLineEdit:hover, QAbstractSpinBox:hover {
+ background-color: #3f3f46;
}
-QCheckBox::indicator:checked:disabled,
-QGroupBox::indicator:checked:disabled
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_checked_disabled.png);
+QAbstractButton:pressed, QAbstractButton:checked {
+ background-color: #434346;
}
-QCheckBox::indicator:unchecked:disabled,
-QGroupBox::indicator:unchecked:disabled
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_unchecked_disabled.png);
+QPushButton {
+ border: 1px solid #3f3f46;
+ padding: 4px 8px;
}
-QRadioButton
-{
- spacing: 5px;
- outline: none;
- color: #adb1b6;
- margin-bottom: 2px;
+QPushButton:pressed {
+ border: 1px solid #434346;
}
-QRadioButton:disabled
-{
- color: #1d1d1c;
-}
-QRadioButton::indicator
-{
- width: 21px;
- height: 21px;
+QPushButton:checked, QToolButton:checked {
+ border: 1px solid #007acc;
}
-QRadioButton::indicator:unchecked
-{
- image: url(:/org.blueberry.ui.qt/dark/radio_unchecked.png);
-}
-
-QRadioButton::indicator:unchecked:hover,
-QRadioButton::indicator:unchecked:focus,
-QRadioButton::indicator:unchecked:pressed
-{
- border: none;
- outline: none;
- image: url(:/org.blueberry.ui.qt/dark/radio_unchecked_focus.png);
+QToolButton {
+ padding: 2px;
}
-QRadioButton::indicator:checked
-{
- border: none;
- outline: none;
- image: url(:/org.blueberry.ui.qt/dark/radio_checked.png);
+QToolBar QToolButton {
+ padding: 4px;
}
-QRadioButton::indicator:checked:hover,
-QRadioButton::indicator:checked:focus,
-QRadioButton::indicator:checked:pressed
-{
+QToolButton#qt_toolbar_ext_button {
+ background-color: transparent;
border: none;
- outline: none;
- image: url(:/org.blueberry.ui.qt/dark/radio_checked_focus.png);
-}
-
-QRadioButton::indicator:checked:disabled
-{
- outline: none;
- image: url(:/org.blueberry.ui.qt/dark/radio_checked_disabled.png);
-}
-
-QRadioButton::indicator:unchecked:disabled
-{
- image: url(:/org.blueberry.ui.qt/dark/radio_unchecked_disabled.png);
-}
-
-QMenuBar
-{
- background-color: #323231;
- color: #adb1b6;
-}
-
-QMenuBar::item
-{
- background: transparent;
-}
-
-QMenuBar::item:selected
-{
- background: transparent;
- border: 1px solid #1d1d1c;
-}
-
-QMenuBar::item:pressed
-{
- border: 1px solid #1d1d1c;
- background-color: #3399cc;
- color: #adb1b6;
- margin-bottom:-1px;
- padding-bottom:1px;
-}
-
-QMenu
-{
- border: 1px solid #1d1d1c;
- color: #adb1b6;
- margin: 2px;
-}
-
-QMenu::icon
-{
- margin: 5px;
-}
-
-QMenu::item
-{
- padding: 5px 30px 5px 30px;
- margin-left: 5px;
- border: 1px solid transparent; /* leave some space for selection border */
-}
-
-QMenu::item:selected
-{
- color: #adb1b6;
-}
-
-QMenu::separator
-{
- height: 2px;
- background: #3399cc;
- margin-left: 10px;
- margin-right: 5px;
-}
-
-QMenu::indicator
-{
- width: 18px;
- height: 18px;
-}
-
-/* non-exclusive indicator = check box style indicator
- (see QActionGroup::setExclusive) */
-QMenu::indicator:non-exclusive:unchecked
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_unchecked.png);
-}
-
-QMenu::indicator:non-exclusive:unchecked:selected
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_unchecked_disabled.png);
-}
-
-QMenu::indicator:non-exclusive:checked
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_checked.png);
-}
-
-QMenu::indicator:non-exclusive:checked:selected
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_checked_disabled.png);
-}
-
-/* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
-QMenu::indicator:exclusive:unchecked {
- image: url(:/org.blueberry.ui.qt/dark/radio_unchecked.png);
-}
-
-QMenu::indicator:exclusive:unchecked:selected {
- image: url(:/org.blueberry.ui.qt/dark/radio_unchecked_disabled.png);
-}
-
-QMenu::indicator:exclusive:checked
-{
- image: url(:/org.blueberry.ui.qt/dark/radio_checked.png);
-}
-
-QMenu::indicator:exclusive:checked:selected
-{
- image: url(:/org.blueberry.ui.qt/dark/radio_checked_disabled.png);
-}
-
-QMenu::right-arrow
-{
- margin: 5px;
- image: url(:/org.blueberry.ui.qt/dark/right_arrow.png)
+ min-width: 12px;
+ padding: 0;
+ qproperty-icon: url(:/org.blueberry.ui.qt/dark/tight-right-arrow-textcolor.svg);
}
-QWidget:disabled
-{
- color: #1d1d1c;
- background-color: #323231;
+QAbstractItemView {
+ alternate-background-color: #1b1b1c;
+ background-color: #252526;
}
-QAbstractItemView
-{
- alternate-background-color: #323231;
- color: #adb1b6;
- border: 1px solid 3A3939;
- border-radius: 0px;
+QHeaderView::section {
+ background-color: #2d2d30;
+ border: 1px solid transparent;
}
-QWidget:focus,
-QMenuBar:focus
-{
- border: 1px solid #3399cc;
+QHeaderView::section:horizontal {
+ border-right: 1px solid #3f3f46;
}
-QCheckBox:focus,
-QRadioButton:focus,
-QSlider:focus
-{
- border: none;
+QHeaderView::section:vertical {
+ border-bottom: 1px solid #3f3f46;
}
-QLineEdit
-{
- background-color: #1d1d1c;
- padding: 2px;
- border-style: solid;
- border: 1px solid #1d1d1c;
- border-radius: 0px;
- color: #adb1b6;
+QHeaderView::section:vertical:checked {
+ background-color: #1c97ea;
}
-QGroupBox
-{
- border:1px solid #323231;
- border-radius: 0px;
- padding-top: 24px;
+QHeaderView::section:vertical:pressed {
+ background-color: #1c97ea;
font-weight: bold;
}
-QGroupBox::title
-{
- border:1px solid #323231;
- border-right:0px;
- border-bottom:0px;
- subcontrol-position: top left;
- subcontrol-origin: margin;
- padding: 1px;
-}
-
-QAbstractScrollArea
-{
- border-radius: 0px;
- border: 1px solid #1d1d1c;
- background-color: #323231;
-}
-
-QScrollBar:horizontal
-{
- height: 15px;
- margin: 3px 15px 3px 15px;
- border: 1px transparent #1d1d1c;
- border-radius: 0px;
- background-color: #1d1d1c;
+QHeaderView::down-arrow {
+ image: url(:/org.blueberry.ui.qt/dark/down-arrow.svg);
+ height: 16px;
+ width: 16px;
}
-QScrollBar::handle:horizontal
-{
- background-color: #323231;
- border: 2px solid #1d1d1c;
- min-width: 5px;
- border-radius: 0px;
+QHeaderView::down-arrow:hover {
+ image: url(:/org.blueberry.ui.qt/dark/down-arrow-hover.svg);
}
-QScrollBar::add-line:horizontal
-{
- margin: 0px 3px 0px 3px;
- border-image: url(:/org.blueberry.ui.qt/dark/right_arrow_disabled.png);
- width: 10px;
- height: 10px;
- subcontrol-position: right;
- subcontrol-origin: margin;
+QHeaderView::down-arrow:pressed {
+ image: url(:/org.blueberry.ui.qt/dark/down-arrow-pressed.svg);
}
-QScrollBar::sub-line:horizontal
-{
- margin: 0px 3px 0px 3px;
- border-image: url(:/org.blueberry.ui.qt/dark/left_arrow_disabled.png);
- height: 10px;
- width: 10px;
- subcontrol-position: left;
- subcontrol-origin: margin;
-}
-
-QScrollBar::add-line:horizontal:hover,
-QScrollBar::add-line:horizontal:on
-{
- border-image: url(:/org.blueberry.ui.qt/dark/right_arrow.png);
- height: 10px;
- width: 10px;
- subcontrol-position: right;
- subcontrol-origin: margin;
-}
-
-QScrollBar::sub-line:horizontal:hover,
-QScrollBar::sub-line:horizontal:on
-{
- border-image: url(:/org.blueberry.ui.qt/dark/left_arrow.png);
- height: 10px;
- width: 10px;
- subcontrol-position: left;
- subcontrol-origin: margin;
+QHeaderView::up-arrow {
+ image: url(:/org.blueberry.ui.qt/dark/up-arrow.svg);
+ height: 16px;
+ width: 16px;
}
-QScrollBar::up-arrow:horizontal,
-QScrollBar::down-arrow:horizontal
-{
- background: none;
+QHeaderView::up-arrow:hover {
+ image: url(:/org.blueberry.ui.qt/dark/up-arrow-hover.svg);
}
-
-QScrollBar::add-page:horizontal,
-QScrollBar::sub-page:horizontal
-{
- background: none;
+QHeaderView::up-arrow:pressed {
+ image: url(:/org.blueberry.ui.qt/dark/up-arrow-pressed.svg);
}
-QScrollBar:vertical
-{
- background-color: #1d1d1c;
- width: 15px;
- margin: 15px 2px 15px 2px;
- border: 1px transparent #1d1d1c;
- border-radius: 0px;
+QGroupBox {
+ border: 1px solid #434346;
+ margin-top: 8px;
+ padding-top: 8px;
}
-QScrollBar::handle:vertical
-{
- background-color: #323231;
- border: 2px solid #1d1d1c;
- min-height: 5px;
- border-radius: 0px;
+QGroupBox, QGroupBox:disabled {
+ background-color: #252526;
}
-QScrollBar::sub-line:vertical
-{
- margin: 3px 0px 3px 0px;
- border-image: url(:/org.blueberry.ui.qt/dark/up_arrow_disabled.png);
- height: 10px;
- width: 10px;
- subcontrol-position: top;
+QGroupBox::title {
+ padding: 0 4px;
subcontrol-origin: margin;
+ subcontrol-position: top center;
}
-QScrollBar::add-line:vertical
-{
- margin: 3px 0px 3px 0px;
- border-image: url(:/org.blueberry.ui.qt/dark/down_arrow_disabled.png);
- height: 10px;
- width: 10px;
- subcontrol-position: bottom;
- subcontrol-origin: margin;
+QComboBox, QLineEdit, QAbstractSpinBox {
+ background-color: #333337;
+ border: 1px solid #434346;
}
-QScrollBar::sub-line:vertical:hover,
-QScrollBar::sub-line:vertical:on
-{
- border-image: url(:/org.blueberry.ui.qt/dark/up_arrow.png);
- height: 10px;
- width: 10px;
- subcontrol-position: top;
- subcontrol-origin: margin;
+QComboBox QAbstractItemView {
+ border: 1px solid #333337;
+ selection-background-color: #3f3f46;
}
-
-QScrollBar::add-line:vertical:hover,
-QScrollBar::add-line:vertical:on
-{
- border-image: url(:/org.blueberry.ui.qt/dark/down_arrow.png);
- height: 10px;
- width: 10px;
- subcontrol-position: bottom;
+QComboBox::drop-down {
+ image: url(:/org.blueberry.ui.qt/dark/down-arrow.svg);
subcontrol-origin: margin;
+ subcontrol-position: right;
+ width: 12px;
}
-QScrollBar::up-arrow:vertical,
-QScrollBar::down-arrow:vertical
-{
- background: none;
-}
-
-
-QScrollBar::add-page:vertical,
-QScrollBar::sub-page:vertical
-{
- background: none;
-}
-
-QTextEdit
-{
- background-color: #1d1d1c;
- color: #adb1b6;
- border: 1px solid #1d1d1c;
-}
-
-QPlainTextEdit
-{
- background-color: #1d1d1c;;
- color: #adb1b6;
- border-radius: 0px;
- border: 1px solid #1d1d1c;
+QComboBox::drop-down:hover {
+ background-color: #1f1f20;
+ border-left: 1px solid #007acc;
+ image: url(:/org.blueberry.ui.qt/dark/down-arrow-pressed.svg);
}
-QHeaderView::section
-{
- background-color: #1d1d1c;
- color: #adb1b6;
- padding: 5px;
- border: 1px solid #1d1d1c;
+QAbstractSpinBox::up-button, QAbstractSpinBox::down-button {
+ background-color: transparent;
+ border: none;
+ height: 9px;
}
-QSizeGrip
-{
- image: url(:/org.blueberry.ui.qt/dark/sizegrip.png);
- width: 12px;
- height: 12px;
+QAbstractSpinBox::up-button:hover, QAbstractSpinBox::down-button:hover {
+ background-color: #1f1f20;
}
-
-QMainWindow::separator
-{
- background-color: #323231;
- color: #adb1b6;
- padding-left: 4px;
- spacing: 2px;
- border: 1px dashed #1d1d1c;
+QAbstractSpinBox::up-arrow {
+ image: url(:/org.blueberry.ui.qt/dark/tight-up-arrow.svg);
}
-QMainWindow::separator:hover
-{
- background-color: #adb1b6;
- color: #adb1b6;
- padding-left: 4px;
- border: 1px solid #1d1d1c;
- spacing: 2px;
+QAbstractSpinBox::up-arrow:disabled, QAbstractSpinBox::up-arrow:off {
+ image: url(:/org.blueberry.ui.qt/dark/tight-up-arrow-disabled.svg);
}
-
-QMenu::separator
-{
- height: 1px;
- background-color: #1d1d1c;
- color: #adb1b6;
- padding-left: 4px;
- margin-left: 10px;
- margin-right: 5px;
+QAbstractSpinBox::up-arrow:hover {
+ image: url(:/org.blueberry.ui.qt/dark/tight-up-arrow-hover.svg);
}
-
-QFrame
-{
- border-radius: 0px;
- border: 1px solid #1d1d1c;
+QAbstractSpinBox::up-arrow:pressed {
+ image: url(:/org.blueberry.ui.qt/dark/tight-up-arrow-pressed.svg);
}
-QFrame[frameShape="0"]
-{
- border-radius: 0px;
- border: 1px transparent #1d1d1c;
+QAbstractSpinBox::down-arrow {
+ image: url(:/org.blueberry.ui.qt/dark/tight-down-arrow.svg);
}
-QStackedWidget
-{
- border: 1px transparent #1d1d1c;
+QAbstractSpinBox::down-arrow:disabled, QAbstractSpinBox::down-arrow:off {
+ image: url(:/org.blueberry.ui.qt/dark/tight-down-arrow-disabled.svg);
}
-QToolBar
-{
- border: 1px transparent #393838;
- background: 1px solid #323231;
- font-weight: bold;
+QAbstractSpinBox::down-arrow:hover {
+ image: url(:/org.blueberry.ui.qt/dark/tight-down-arrow-hover.svg);
}
-/* this fixes the size of the plugin icons in the toolbar */
-QToolBar QToolButton
-{
- background-color: #323231;
- border: 1px solid #323231;
- border-radius: 0px;
- min-width: 30px;
- min-height: 30px;
- margin: 0px;
- padding: 0px;
+QAbstractSpinBox::down-arrow:pressed {
+ image: url(:/org.blueberry.ui.qt/dark/tight-down-arrow-pressed.svg);
}
-QToolBar::handle:horizontal
-{
- image: url(:/org.blueberry.ui.qt/dark/Hmovetoolbar.png);
-}
-QToolBar::handle:vertical
-{
- image: url(:/org.blueberry.ui.qt/dark/Vmovetoolbar.png);
-}
-QToolBar::separator:horizontal
-{
- image: url(:/org.blueberry.ui.qt/dark/Hsepartoolbar.png);
-}
-QToolBar::separator:vertical
-{
- image: url(:/org.blueberry.ui.qt/dark/Vsepartoolbar.png);
-}
-
-QToolButton
-{
- background-color: #323231;
- border: 1px solid #323231;
- border-radius: 0px;
- min-width: 12px;
- min-height: 12px;
- margin: 0px;
- padding: 0px;
-}
-
-/* only for MenuButtonPopup */
-QToolButton[popupMode="1"]
-{
- border: 0px solid #1d1d1c;
-}
-
-/* only for InstantPopup */
-QToolButton[popupMode="2"]
-{
- border: 0px solid #1d1d1c;
-}
-
-/* this fixes the size of the standard icons in the toolbar */
-QToolButton:hover,
-QToolButton::menu-button:hover
-{
- background-color: #3399cc;
- border: 1px solid #3399cc;
- min-width: 30px;
- min-height: 30px;
- margin: 0px;
- padding: 0px;
-}
-
-QToolButton#qt_toolbar_ext_button,
-QToolBarExtension
-{
- qproperty-icon: url(:/org.blueberry.ui.qt/dark/right_arrows.svg);
- min-width: 10px;
-}
-
-QPushButton
-{
- color: #adb1b6;
- background-color: #323231;
-
- border-width: 1px;
- border-color: #1d1d1c;
- border-style: solid;
- padding: 3px;
- border-radius: 0px;
- outline: none;
-}
-
-QPushButton:disabled
-{
- background-color: #1d1d1c;
- color: #323231;
+QCheckBox, QCheckBox:hover, QCheckBox:disabled, QCheckBox:checked, QRadioButton, QRadioButton:hover, QRadioButton:disabled, QRadioButton:checked {
+ background-color: none;
}
-QPushButton:focus
-{
- color: #3399cc;
- border-color: #3399cc;
- border-style: solid;
- border-width: 1px;
-}
-
-QPushButton:pressed
-{
- background-color: #3399cc;
- color: #1d1d1c;
- padding-top: -15px;
- padding-bottom: -17px;
- border-width: 1px;
- border-color: #1d1d1c;
-}
-
-QComboBox
-{
- selection-background-color: #3399cc;
- selection-color: #1d1d1c;
- border: 1px solid #1d1d1c;
- border-radius: 0px;
- padding: 3px;
- min-width: 75px;
-}
-
-QPushButton:checked{
- background-color: #1d1d1c;
- border-color: #adb1b6;
-}
-
-QComboBox:hover,
-QAbstractSpinBox:hover,
-QLineEdit:hover,
-QTextEdit:hover,
-QPlainTextEdit:hover,
-QAbstractView:hover
-{
- border: 1px solid #3399cc;
- color: #adb1b6;
-}
-
-QPushButton:hover,QTreeView:hover
-{
- border: 1px solid #1d1d1c;
- color: #3399cc;
-}
-
-QComboBox QAbstractItemView
-{
- background-color: #323231;
- border-radius: 0px;
- border: 1px solid #1d1d1c;
- selection-background-color: #3399cc;
- selection-color: #adb1b6;
-}
-
-QComboBox:on
-{
- padding-top: 3px;
- padding-left: 3px;
- selection-background-color: #3399cc;
- color: #adb1b6;
- selection-color: #adb1b6;
-}
-
-QComboBox::drop-down
-{
- subcontrol-origin: padding;
- subcontrol-position: top right;
- min-width: 15px;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0px;
+QCheckBox::indicator, QRadioButton::indicator {
+ height: 13px;
+ width: 13px;
}
-QComboBox::down-arrow
-{
- image: url(:/org.blueberry.ui.qt/dark/down_arrow_disabled.png);
+QCheckBox::indicator:unchecked {
+ image: url(:/org.blueberry.ui.qt/dark/checkbox-unchecked.svg);
}
-QComboBox::down-arrow:on,
-QComboBox::down-arrow:hover,
-QComboBox::down-arrow:focus
-{
- image: url(:/org.blueberry.ui.qt/dark/down_arrow.png);
+QCheckBox::indicator:unchecked:hover {
+ image: url(:/org.blueberry.ui.qt/dark/checkbox-unchecked-hover.svg);
}
-QAbstractSpinBox
-{
- border: 1px solid #1d1d1c;
- background-color: #1d1d1c;
- padding-top: 1px;
- padding-bottom: 1px;
- color: #adb1b6;
- border-radius: 0px;
- min-width: 50px;
+QCheckBox::indicator:unchecked:disabled {
+ image: url(:/org.blueberry.ui.qt/dark/checkbox-unchecked-disabled.svg);
}
-QAbstractSpinBox:up-button
-{
- border: 2px transparent #1d1d1c;
- background-color: #323231;
- subcontrol-origin: border;
- subcontrol-position: top right;
- padding-top: 1px;
- margin-bottom: 1px;
- margin-top: 2px;
- margin-right: 2px;
- margin-left: 2px;
+QCheckBox::indicator:checked {
+ image: url(:/org.blueberry.ui.qt/dark/checkbox-checked.svg);
}
-QAbstractSpinBox:down-button
-{
- border: 2px transparent #1d1d1c;
- background-color: #323231;
- subcontrol-origin: border;
- subcontrol-position: bottom right;
- padding-bottom: 0px;
- margin-bottom: 2px;
- margin-top: 1px;
- margin-right: 2px;
- margin-left: 2px;
+QCheckBox::indicator:checked:hover {
+ image: url(:/org.blueberry.ui.qt/dark/checkbox-checked-hover.svg);
}
-QAbstractSpinBox::up-arrow,QAbstractSpinBox::up-arrow:disabled,QAbstractSpinBox::up-arrow:off
-{
- image: url(:/org.blueberry.ui.qt/dark/up_arrow_disabled.png);
- width: 10px;
- height: 10px;
+QCheckBox::indicator:checked:disabled {
+ image: url(:/org.blueberry.ui.qt/dark/checkbox-checked-disabled.svg);
}
-QAbstractSpinBox::up-arrow:hover
-{
- image: url(:/org.blueberry.ui.qt/dark/up_arrow.png);
+QRadioButton::indicator:unchecked {
+ image: url(:/org.blueberry.ui.qt/dark/radiobutton-unchecked.svg);
}
-QAbstractSpinBox::down-arrow,QAbstractSpinBox::down-arrow:disabled,QAbstractSpinBox::down-arrow:off
-{
- image: url(:/org.blueberry.ui.qt/dark/down_arrow_disabled.png);
- width: 10px;
- height: 10px;
+QRadioButton::indicator:unchecked:hover {
+ image: url(:/org.blueberry.ui.qt/dark/radiobutton-unchecked-hover.svg);
}
-QAbstractSpinBox::down-arrow:hover
-{
- image: url(:/org.blueberry.ui.qt/dark/down_arrow.png);
+QRadioButton::indicator:unchecked:disabled {
+ image: url(:/org.blueberry.ui.qt/dark/radiobutton-unchecked-disabled.svg);
}
-QLabel
-{
- border: 1px solid #1d1d1c;
+QRadioButton::indicator:checked {
+ image: url(:/org.blueberry.ui.qt/dark/radiobutton-checked.svg);
}
-QTabWidget::pane
-{
- border: 1px solid #adb1b6;
- padding: 1px;
- margin: 0px;
+QRadioButton::indicator:checked:hover {
+ image: url(:/org.blueberry.ui.qt/dark/radiobutton-checked-hover.svg);
}
-/* TABS IN GENERAL */
-QTabBar
-{
- qproperty-drawBase: 0;
- left: 0px;
- border-radius: 0px;
- border: 1px transparent #adb1b6;
+QRadioButton::indicator:checked:disabled {
+ image: url(:/org.blueberry.ui.qt/dark/radiobutton-checked-disabled.svg);
}
-QTabBar:focus
-{
- border: 1px solid #adb1b6;
+QSlider::groove {
+ background-color: #686868;
}
-QTabBar::close-button
-{
- image: url(:/org.blueberry.ui.qt/dark/tab_close_grey.svg);
- background: transparent;
+QSlider::groove:hover {
+ background-color: #9e9e9e;
}
-QTabBar::close-button:hover
-{
- image: url(:/org.blueberry.ui.qt/dark/tab_close_grey.svg);
- background: transparent;
+QSlider::groove:horizontal {
+ height: 3px;
}
-QTabBar::close-button:pressed {
- image: url(:/org.blueberry.ui.qt/dark/tab_close_grey.svg);
- background: transparent;
+QSlider::groove:vertical {
+ width: 3px;
}
-QTabBar::tab:right:!selected:hover
-{
- color: #3399cc;
+QSlider::handle {
+ background-color: #686868;
}
-QTabBar QToolButton::right-arrow:enabled
-{
- image: url(:/org.blueberry.ui.qt/dark/right_arrow.png);
+QSlider::handle:hover {
+ background-color: #1c97ea;
}
-QTabBar QToolButton::left-arrow:enabled
-{
- image: url(:/org.blueberry.ui.qt/dark/left_arrow.png);
+QSlider::handle:pressed {
+ background-color: #007acc;
}
-QTabBar QToolButton::right-arrow:disabled
-{
- image: url(:/org.blueberry.ui.qt/dark/right_arrow_disabled.png);
+QSlider::handle:horizontal {
+ margin: -8px 0;
+ width: 8px;
}
-QTabBar QToolButton::left-arrow:disabled
-{
- image: url(:/org.blueberry.ui.qt/dark/left_arrow_disabled.png);
+QSlider::handle::vertical {
+ margin: 0 -8px;
+ height: 8px;
}
-QTabBar::scroller
-{
- margin: 0px;
- padding: 0px;
+QLineEdit:hover {
+ border: 1px solid #2b7de1;
}
-/* TOP TABS */
-QTabBar::tab:top
-{
- font-weight: normal;
- color:#1d1d1c;
- border: 1px solid #adb1b6;
- border-bottom: 0px;
- background: #adb1b6;
- padding: 2px;
- min-width: 150px;
- border-top-left-radius: 0px;
- border-top-right-radius: 0px;
+QLabel, QLabel:disabled {
+ background-color: none;
}
-QTabBar::tab:top:!selected
-{
- color: #adb1b6;
- font-weight: normal;
- background-color: #323231;
- border: 0px solid #323231;
- border-top-left-radius: 0px;
- border-top-right-radius: 0px;
+QMenu {
+ border: 1px solid #3e3e40;
}
-QTabBar::tab:top:!selected:hover
-{
- color: #3399cc;
+QMenu QWidget {
+ background-color: #1b1b1c;
}
-/* BOTTOM TABS */
-QTabBar::tab:bottom
-{
- font-weight: bold;
- color: #ffffff ;
- border: 0px solid #1d1d1c;
- background-color: #1d1d1c;
- padding: 5px;
- border-bottom-left-radius: 0px;
- border-bottom-right-radius: 0px;
- min-width: 50px;
-}
-
-QTabBar::tab:bottom:!selected
-{
- color: #adb1b6;
- font-weight: normal;
- background-color: #323231;
- border: 0px solid #1d1d1c;
- border-bottom-left-radius: 0px;
- border-bottom-right-radius: 0px;
-}
-
-QTabBar::tab:bottom:!selected:hover
-{
- color: #3399cc;
-}
-
-/* LEFT TABS */
-QTabBar::tab:left
-{
- color: #adb1b6;
- font-weight: bold;
- border: 0px solid #1d1d1c;
- background-color: #1d1d1c;
- padding: 5px;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0px;
- min-height: 50px;
+QMenu::item {
+ background-color: #1b1b1c;
}
-QTabBar::tab:left:!selected
-{
- color: #adb1b6;
- font-weight: normal;
- background-color: #323231;
- border: 0px solid #1d1d1c;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0px;
+QMenu::item:selected {
+ background-color: #333334;
}
-QTabBar::tab:left:!selected:hover
-{
- color: #3399cc;
+QMenu::separator {
+ height: 1px;
+ background-color: #3e3e40;
}
-/* RIGHT TABS */
-QTabBar::tab:right
-{
- color: #adb1b6;
- font-weight: bold;
- border: 0px solid #1d1d1c;
- background-color: #1d1d1c;
- padding: 5px;
- border-top-left-radius: 0px;
- border-bottom-left-radius: 0px;
- min-height: 50px;
-}
-
-QTabBar::tab:right:!selected
-{
- color: #adb1b6;
- font-weight: normal;
- background-color: #323231;
- border: 0px solid #1d1d1c;
- border-top-left-radius: 0px;
- border-bottom-left-radius: 0px;
-}
-
-/* TODO check if #403F3F is nice */
-QDockWidget
-{
- background: #323231;
- border: 1px solid #403F3F;
- titlebar-close-icon: url(:/org.blueberry.ui.qt/dark/tab_close_grey.svg);
- titlebar-normal-icon: url(:/org.blueberry.ui.qt/dark/undock.png);
-}
-
-QDockWidget::close-button, QDockWidget::float-button
-{
- border: 1px solid transparent;
- border-radius: 0px;
- background: transparent;
+QMenuBar::item:selected {
+ background-color: #3e3e40;
}
-/* TODO check if rgba(255, 255, 255, 10) is nice */
-QDockWidget::close-button:hover,
-QDockWidget::float-button:hover
-{
- background: rgba(255, 255, 255, 10);
+QScrollBar {
+ background-color: #3e3e42;
}
-QDockWidget::close-button:pressed,
-QDockWidget::float-button:pressed
-{
- padding: 1px -1px -1px 1px;
- background: rgba(255, 255, 255, 10);
+QScrollBar:horizontal {
+ height: 18px;
+ margin: 0 18px 0 18px;
}
-QTreeView, QListView
-{
- border: 1px solid #1d1d1c;
- background-color: #1d1d1c;
+QScrollBar:vertical {
+ width: 18px;
+ margin: 18px 0 18px 0;
}
-QTreeView::indicator:unchecked
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_big_unchecked.png);
+QScrollBar::handle {
+ background-color: #686868;
}
-QTreeView::indicator:checked,
-QTreeView::indicator:indeterminate
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_big_checked.png);
+QScrollBar::handle:hover {
+ background-color: #9e9e9e;
}
-QTreeView::indicator:unchecked:selected
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_big_unchecked_disabled.png);
+QScrollBar::handle:pressed {
+ background-color: #efebef;
}
-QTreeView::indicator:indeterminate:selected,
-QTreeView::indicator:checked:selected
-{
- image: url(:/org.blueberry.ui.qt/dark/checkbox_big_checked_disabled.png);
+QScrollBar::handle:horizontal {
+ min-width: 18px;
+ margin: 4px 0 5px 0;
}
-QTreeView:branch:selected,
-QTreeView:branch:hover
-{
- background: url(:/org.blueberry.ui.qt/dark/transparent.png);
+QScrollBar::handle:vertical {
+ min-height: 18px;
+ margin: 0 5px 0 4px;
}
-QTreeView::branch:has-siblings:!adjoins-item
-{
- border-image: url(:/org.blueberry.ui.qt/dark/transparent.png);
+QScrollBar::add-page, QScrollBar::sub-page {
+ background-color: none;
}
-QTreeView::branch:has-siblings:adjoins-item
-{
- border-image: url(:/org.blueberry.ui.qt/dark/transparent.png);
+QScrollBar::add-line, QScrollBar::sub-line {
+ background-color: #3e3e42;
+ subcontrol-origin: margin;
}
-QTreeView::branch:!has-children:!has-siblings:adjoins-item
-{
- border-image: url(:/org.blueberry.ui.qt/dark/transparent.png);
+QScrollBar::add-line:horizontal {
+ subcontrol-position: right;
+ width: 18px;
}
-QTreeView::branch:has-children:!has-siblings:closed,
-QTreeView::branch:closed:has-children:has-siblings
-{
- image: url(:/org.blueberry.ui.qt/dark/branch_closed.png);
+QScrollBar::sub-line:horizontal {
+ subcontrol-position: left;
+ width: 18px;
}
-QTreeView::branch:open:has-children:!has-siblings,
-QTreeView::branch:open:has-children:has-siblings
-{
- image: url(:/org.blueberry.ui.qt/dark/branch_open.png);
+QScrollBar::add-line:vertical {
+ subcontrol-position: bottom;
+ height: 18px;
}
-QTreeView::branch:has-children:!has-siblings:closed:hover,
-QTreeView::branch:closed:has-children:has-siblings:hover
-{
- image: url(:/org.blueberry.ui.qt/dark/branch_closed-on.png);
+QScrollBar::sub-line:vertical {
+ subcontrol-position: top;
+ height: 18px;
}
-QTreeView::branch:open:has-children:!has-siblings:hover,
-QTreeView::branch:open:has-children:has-siblings:hover
-{
- image: url(:/org.blueberry.ui.qt/dark/branch_open-on.png);
+QScrollBar::up-arrow, QScrollBar::right-arrow, QScrollBar:down-arrow, QScrollBar:left-arrow {
+ width: 18px;
+ height: 18px;
}
-QListView::item:!selected:hover,
-QTreeView::item:!selected:hover
-{
- background: #323231;
- outline: 0;
- color: #adb1b6
+QScrollBar::down-arrow {
+ image: url(:/org.blueberry.ui.qt/dark/down-arrow.svg);
}
-QListView::item:selected:hover,
-QTreeView::item:selected:hover
-{
- background: #3399cc;
- color: #adb1b6;
+QScrollBar::down-arrow:disabled {
+ image: url(:/org.blueberry.ui.qt/dark/down-arrow-disabled.svg);
}
-QSlider::groove:horizontal
-{
- border: 1px solid #1d1d1c;
- height: 3px;
- background: #1d1d1c;
- margin: 0px;
- border-radius: 0px;
+QScrollBar::down-arrow:hover {
+ image: url(:/org.blueberry.ui.qt/dark/down-arrow-hover.svg);
}
-QSlider::handle:horizontal
-{
- background: #adb1b6;
- border: 1px solid #1d1d1c;
- width: 7px;
- height: 16px;
- margin: -8px 0;
- border-radius: 0px;
+QScrollBar::down-arrow:pressed {
+ image: url(:/org.blueberry.ui.qt/dark/down-arrow-pressed.svg);
}
-QSlider::groove:vertical
-{
- border: 1px solid #1d1d1c;
- width: 3px;
- background: #1d1d1c;
- margin: 0px;
- border-radius: 0px;
+QScrollBar::left-arrow {
+ image: url(:/org.blueberry.ui.qt/dark/left-arrow.svg);
}
-QSlider::handle:vertical
-{
- background: #adb1b6;
- border: 1px solid #1d1d1c;
- width: 16px;
- height: 7px;
- margin: 0 -8px;
- border-radius: 0px;
+QScrollBar::left-arrow:disabled {
+ image: url(:/org.blueberry.ui.qt/dark/left-arrow-disabled.svg);
}
-QmitkRenderWindowMenu
-{
- background-color: transparent;
+QScrollBar::left-arrow:hover {
+ image: url(:/org.blueberry.ui.qt/dark/left-arrow-hover.svg);
}
-/* this fixes the size of the icons in the stdMultiWidget */
-QmitkRenderWindowMenu QToolButton,
-QmitkRenderWindowMenu QToolButton::menu-button {
- background-color: transparent;
- border: 0px solid #1d1d1c;
- border-radius: 0px;
- width: 15px;
- height: 15px;
- margin: 1px;
- padding: 0px;
-}
-
-QmitkRenderWindowMenu QToolButton:hover,
-QmitkRenderWindowMenu QToolButton::menu-button:hover
-{
- background-color: #adb1b6;
- border: 0px solid #3399cc;
- width: 15px;
- height: 15px;
- margin: 1px;
- padding: 0px;
-}
-
-QToolButton:checked,
-QToolButton:pressed,
-QToolButton::menu-button:pressed
-{
- color: #3399cc;
- border: 1px solid #3399cc;
- padding: 0px;
-}
-
-/* the subcontrol below is used only in the InstantPopup or DelayedPopup mode */
-QToolButton::menu-indicator
-{
- image: url(:/org.blueberry.ui.qt/dark/down_arrow.png);
- top: -7px; left: -2px; /* shift it a bit */
-}
-
-/* the subcontrols below are used only in the MenuButtonPopup mode */
-QToolButton::menu-button
-{
- border: 1px transparent #1d1d1c;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0px;
- /* 16px width + 4px for border = 20px allocated above */
- width: 16px;
- outline: none;
+QScrollBar::left-arrow:pressed {
+ image: url(:/org.blueberry.ui.qt/dark/left-arrow-pressed.svg);
}
-QToolButton::menu-arrow
-{
- image: url(:/org.blueberry.ui.qt/dark/down_arrow.png);
+QScrollBar::right-arrow {
+ image: url(:/org.blueberry.ui.qt/dark/right-arrow.svg);
}
-QToolButton::menu-arrow:open
-{
- border: 1px solid #1d1d1c;
+QScrollBar::right-arrow:disabled {
+ image: url(:/org.blueberry.ui.qt/dark/right-arrow-disabled.svg);
}
-QPushButton::menu-indicator
-{
- subcontrol-origin: padding;
- subcontrol-position: bottom right;
- left: 8px;
+QScrollBar::right-arrow:hover {
+ image: url(:/org.blueberry.ui.qt/dark/right-arrow-hover.svg);
}
-QTableView
-{
- border: 1px solid #1d1d1c;
- gridline-color: #323231;
- background-color: #1d1d1c;
+QScrollBar::right-arrow:pressed {
+ image: url(:/org.blueberry.ui.qt/dark/right-arrow-pressed.svg);
}
-
-QTableView, QHeaderView
-{
- border-radius: 0px;
+QScrollBar::up-arrow {
+ image: url(:/org.blueberry.ui.qt/dark/up-arrow.svg);
}
-QTableView::item:pressed, QListView::item:pressed, QTreeView::item:pressed
-{
- background: #3399cc;
- color: #1d1d1c;
+QScrollBar::up-arrow:disabled {
+ image: url(:/org.blueberry.ui.qt/dark/up-arrow-disabled.svg);
}
-QTableView::item:selected:active, QTreeView::item:selected:active, QListView::item:selected:active
-{
- background: #3399cc;
- color: #1d1d1c;
+QScrollBar::up-arrow:hover {
+ image: url(:/org.blueberry.ui.qt/dark/up-arrow-hover.svg);
}
-
-QHeaderView
-{
- background-color: #323231;
- border: 1px transparent;
- border-radius: 0px;
- margin: 0px;
- padding: 0px;
+QScrollBar::up-arrow:pressed {
+ image: url(:/org.blueberry.ui.qt/dark/up-arrow-pressed.svg);
}
-QHeaderView::section
-{
- background-color: #323231;
- color: #adb1b6;
- padding: 5px;
- border: 1px solid #1d1d1c;
- border-radius: 0px;
- text-align: left;
+QTabWidget::pane {
+ border: 1px solid #434346;
}
-QHeaderView::section::vertical::first, QHeaderView::section::vertical::only-one
-{
- border-top: 1px solid #1d1d1c;
+QTabBar::tab {
+ background-color: #434346;
+ border: 1px solid #434346;
+ border-bottom: none;
+ padding: 4px;
}
-QHeaderView::section::vertical
-{
- border-top: transparent;
+QTabBar::tab:middle {
+ border-left: none;
}
-QHeaderView::section::horizontal::first, QHeaderView::section::horizontal::only-one
-{
- border-left: 1px solid #1d1d1c;
+QTabBar::tab:last {
+ border-left: none;
}
-QHeaderView::section::horizontal
-{
- border-left: transparent;
+QTabBar::tab:next-selected {
+ border-right: none;
}
-QHeaderView::section:checked
-{
- color: #adb1b6;
- background-color: #323231;
+QTabBar::tab:selected {
+ border: 1px solid #434346;
+ border-bottom: none;
}
-/* sort indicator */
-QHeaderView::down-arrow
-{
- image: url(:/org.blueberry.ui.qt/dark/down_arrow.png);
+QTabBar::tab:!selected {
+ background-color: #2d2d30;
+ margin-top: 4px;
}
-QHeaderView::up-arrow
-{
- image: url(:/org.blueberry.ui.qt/dark/up_arrow.png);
+QTabBar::tab:!selected:hover {
+ background-color: #434346;
}
-
-QTableCornerButton::section
-{
- background-color: #323231;
- border: 1px transparent #1d1d1c;
- border-radius: 0px;
-
+#TabCloseButton {
+ background-color: none;
}
-QToolBox
-{
- color: #adb1b6;
- background-color: #323231;
- padding: 5px;
- border: 1px solid #adb1b6;
- border-bottom: 1px solid #adb1b6;
-
+QTabBar QToolButton::left-arrow {
+ image: url(:/org.blueberry.ui.qt/dark/tight-left-arrow.svg);
}
-QToolBox::tab
-{
- color:#adb1b6;
- background-color: #323231;
- border: 1px solid #adb1b6;
- border-bottom: 1px solid #adb1b6;
- border-top-left-radius: 0px;
- border-top-right-radius: 0px;
-
+QTabBar QToolButton::left-arrow:hover {
+ image: url(:/org.blueberry.ui.qt/dark/tight-left-arrow-hover.svg);
}
-QToolBox::tab:hover
-{
-color : #3399cc;
+QTabBar QToolButton::left-arrow:pressed {
+ image: url(:/org.blueberry.ui.qt/dark/tight-left-arrow-pressed.svg);
}
-QToolBox::tab:selected
-{
- color :#1d1d1c;
- font-weight: normal;
- border: 1px solid #adb1b6;
- border-bottom: 1px solid #adb1b6;
- background: #adb1b6;
- frame: Box;
- midLineWidth:1;
- lineWidth:1;
- }
-QStatusBar::item
-{
- border: 0px transparent #1d1d1c;
+QTabBar QToolButton::left-arrow:disabled {
+ image: url(:/org.blueberry.ui.qt/dark/tight-left-arrow-disabled.svg);
}
-QSplitter::handle
-{
- border: 1px dashed #1d1d1c;
+QTabBar QToolButton::right-arrow {
+ image: url(:/org.blueberry.ui.qt/dark/tight-right-arrow.svg);
}
-QSplitter::handle:hover
-{
- background-color: #adb1b6;
- border: 1px solid #1d1d1c;
+QTabBar QToolButton::right-arrow:hover {
+ image: url(:/org.blueberry.ui.qt/dark/tight-right-arrow-hover.svg);
}
-QSplitter::handle:horizontal
-{
- width: 1px;
+QTabBar QToolButton::right-arrow:pressed {
+ image: url(:/org.blueberry.ui.qt/dark/tight-right-arrow-pressed.svg);
}
-QSplitter::handle:vertical
-{
- height: 1px;
+QTabBar QToolButton::right-arrow:disabled {
+ image: url(:/org.blueberry.ui.qt/dark/tight-right-arrow-disabled.svg);
}
-QProgressBar
-{
- border: 1px solid #1d1d1c;
- border-radius: 0px;
- text-align: center;
+QTreeView::branch:closed:has-children:has-siblings,
+QTreeView::branch:closed:has-children:!has-siblings {
+ image: url(:/org.blueberry.ui.qt/dark/right-arrow.svg);
}
-QProgressBar::chunk
-{
- background-color: #3399cc;
+QTreeView::branch:closed:has-children:has-siblings:hover,
+QTreeView::branch:closed:has-children:!has-siblings:hover {
+ image: url(:/org.blueberry.ui.qt/dark/right-arrow-hover.svg);
}
-QDateEdit
-{
- selection-background-color: #3399cc;
- selection-color: #1d1d1c;
- border: 1px solid #1d1d1c;
- border-radius: 0px;
- padding: 1px;
- min-width: 75px;
+QTreeView::branch:open:has-children:has-siblings,
+QTreeView::branch:open:has-children:!has-siblings {
+ image: url(:/org.blueberry.ui.qt/dark/down-arrow.svg);
}
-QDateEdit:on
-{
- padding-top: 3px;
- padding-left: 4px;
+QTreeView::branch:open:has-children:has-siblings:hover,
+QTreeView::branch:open:has-children:!has-siblings:hover {
+ image: url(:/org.blueberry.ui.qt/dark/down-arrow-hover.svg);
}
-QDateEdit QAbstractItemView
-{
- background-color: #1d1d1c;
- border-radius: 0px;
- border: 1px solid #1d1d1c;
- selection-background-color: #3399cc;
- selection-color: #1d1d1c;
+QTreeView::indicator:unchecked {
+ image: url(:/org.blueberry.ui.qt/dark/checkbox-unchecked.svg);
}
-QDateEdit::drop-down
-{
- subcontrol-origin: padding;
- subcontrol-position: top right;
- width: 15px;
- border-left-width: 0px;
- border-left-color: darkgray;
- border-left-style: solid;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0px;
+QTreeView::indicator:unchecked:selected {
+ image: url(:/org.blueberry.ui.qt/dark/checkbox-unchecked-hover.svg);
}
-QDateEdit::down-arrow
-{
- image: url(:/org.blueberry.ui.qt/dark/down_arrow_disabled.png);
+QTreeView::indicator:checked, QTreeView::indicator:indeterminate {
+ image: url(:/org.blueberry.ui.qt/dark/checkbox-checked.svg);
}
-QDateEdit::down-arrow:on, QDateEdit::down-arrow:hover,
-QDateEdit::down-arrow:focus
-{
- image: url(:/org.blueberry.ui.qt/dark/down_arrow.png);
+QTreeView::indicator:checked:selected, QTreeView::indicator:indeterminate:selected {
+ image: url(:/org.blueberry.ui.qt/dark/checkbox-checked-hover.svg);
}
diff --git a/Plugins/org.blueberry.ui.qt/resources/org_blueberry_ui_qt.qrc b/Plugins/org.blueberry.ui.qt/resources/org_blueberry_ui_qt.qrc
index c03d3564ac..9a3500b41a 100755
--- a/Plugins/org.blueberry.ui.qt/resources/org_blueberry_ui_qt.qrc
+++ b/Plugins/org.blueberry.ui.qt/resources/org_blueberry_ui_qt.qrc
@@ -1,73 +1,95 @@
cursor_bottom.xpm
cursor_center.xpm
cursor_left.xpm
cursor_offscreen.xpm
cursor_right.xpm
cursor_top.xpm
dialog-error.svg
icon_missing.png
- tab_close_grey.svg
- tab_close_grey_active.svg
+ tab_close.svg
lightstyle.qss
lightstyle-activetab.qss
lightstyle-tab.qss
- dark/up_arrow_disabled.png
dark/Hmovetoolbar.png
dark/stylesheet-branch-end.png
dark/branch_closed-on.png
dark/stylesheet-vline.png
dark/branch_closed.png
dark/branch_open-on.png
dark/transparent.png
- dark/right_arrow_disabled.png
dark/right_arrows.svg
dark/sizegrip.png
dark/tab_close_grey.svg
dark/tab_close_grey_active.svg
- dark/down_arrow.png
dark/Vmovetoolbar.png
- dark/left_arrow.png
dark/stylesheet-branch-more.png
- dark/up_arrow.png
- dark/right_arrow.png
- dark/left_arrow_disabled.png
dark/Hsepartoolbar.png
dark/branch_open.png
dark/Vsepartoolbar.png
- dark/down_arrow_disabled.png
dark/undock.png
- dark/checkbox_checked_disabled.png
- dark/checkbox_checked_focus.png
- dark/checkbox_checked.png
- dark/checkbox_indeterminate_disabled.png
- dark/checkbox_indeterminate_focus.png
- dark/checkbox_indeterminate.png
- dark/checkbox_unchecked_disabled.png
- dark/checkbox_unchecked_focus.png
- dark/checkbox_unchecked.png
- dark/checkbox_big_checked_disabled.png
- dark/checkbox_big_checked.png
- dark/checkbox_big_unchecked_disabled.png
- dark/checkbox_big_unchecked.png
- dark/radio_checked_disabled.png
- dark/radio_checked_focus.png
- dark/radio_checked.png
- dark/radio_unchecked_disabled.png
- dark/radio_unchecked_focus.png
- dark/radio_unchecked.png
+
+ dark/down-arrow.svg
+ dark/down-arrow-disabled.svg
+ dark/down-arrow-hover.svg
+ dark/down-arrow-pressed.svg
+ dark/left-arrow.svg
+ dark/left-arrow-disabled.svg
+ dark/left-arrow-hover.svg
+ dark/left-arrow-pressed.svg
+ dark/right-arrow.svg
+ dark/right-arrow-disabled.svg
+ dark/right-arrow-hover.svg
+ dark/right-arrow-pressed.svg
+ dark/up-arrow.svg
+ dark/up-arrow-disabled.svg
+ dark/up-arrow-hover.svg
+ dark/up-arrow-pressed.svg
+
+ dark/tight-down-arrow.svg
+ dark/tight-down-arrow-disabled.svg
+ dark/tight-down-arrow-hover.svg
+ dark/tight-down-arrow-pressed.svg
+ dark/tight-left-arrow.svg
+ dark/tight-left-arrow-disabled.svg
+ dark/tight-left-arrow-hover.svg
+ dark/tight-left-arrow-pressed.svg
+ dark/tight-right-arrow.svg
+ dark/tight-right-arrow-disabled.svg
+ dark/tight-right-arrow-hover.svg
+ dark/tight-right-arrow-pressed.svg
+ dark/tight-up-arrow.svg
+ dark/tight-up-arrow-disabled.svg
+ dark/tight-up-arrow-hover.svg
+ dark/tight-up-arrow-pressed.svg
+
+ dark/tight-right-arrow-textcolor.svg
+
+ dark/checkbox-unchecked.svg
+ dark/checkbox-unchecked-hover.svg
+ dark/checkbox-unchecked-disabled.svg
+ dark/checkbox-checked.svg
+ dark/checkbox-checked-hover.svg
+ dark/checkbox-checked-disabled.svg
+
+ dark/radiobutton-unchecked.svg
+ dark/radiobutton-unchecked-hover.svg
+ dark/radiobutton-unchecked-disabled.svg
+ dark/radiobutton-checked.svg
+ dark/radiobutton-checked-hover.svg
+ dark/radiobutton-checked-disabled.svg
darkstyle.qss
darkstyle-tab.qss
darkstyle-activetab.qss
fonts/FiraSans/FiraSans.ttf
fonts/LightFiraSans/LightFiraSans.ttf
fonts/Roboto/Roboto.ttf
fonts/OpenSans/OpenSans-Regular.ttf
fonts/xkcd/xkcd.ttf
diff --git a/Plugins/org.blueberry.ui.qt/resources/tab_close.svg b/Plugins/org.blueberry.ui.qt/resources/tab_close.svg
new file mode 100644
index 0000000000..7a3bdfb95a
--- /dev/null
+++ b/Plugins/org.blueberry.ui.qt/resources/tab_close.svg
@@ -0,0 +1,56 @@
+
+
diff --git a/Plugins/org.blueberry.ui.qt/resources/tab_close_grey.svg b/Plugins/org.blueberry.ui.qt/resources/tab_close_grey.svg
deleted file mode 100644
index 509788d4f1..0000000000
--- a/Plugins/org.blueberry.ui.qt/resources/tab_close_grey.svg
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
diff --git a/Plugins/org.blueberry.ui.qt/resources/tab_close_grey_active.svg b/Plugins/org.blueberry.ui.qt/resources/tab_close_grey_active.svg
deleted file mode 100644
index 2ebf9d201d..0000000000
--- a/Plugins/org.blueberry.ui.qt/resources/tab_close_grey_active.svg
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
diff --git a/Plugins/org.blueberry.ui.qt/src/application/berryQtWorkbenchAdvisor.cpp b/Plugins/org.blueberry.ui.qt/src/application/berryQtWorkbenchAdvisor.cpp
index 06ac0593b5..738dfba4f8 100755
--- a/Plugins/org.blueberry.ui.qt/src/application/berryQtWorkbenchAdvisor.cpp
+++ b/Plugins/org.blueberry.ui.qt/src/application/berryQtWorkbenchAdvisor.cpp
@@ -1,63 +1,63 @@
/*===================================================================
BlueBerry Platform
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#include "berryQtWorkbenchAdvisor.h"
#include "internal/berryQtGlobalEventFilter.h"
#include "berryWorkbenchPlugin.h"
#include "berryQtPreferences.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace berry
{
void QtWorkbenchAdvisor::Initialize(IWorkbenchConfigurer::Pointer configurer)
{
WorkbenchAdvisor::Initialize(configurer);
IPreferencesService* prefService = WorkbenchPlugin::GetDefault()->GetPreferencesService();
IPreferences::Pointer prefs = prefService->GetSystemPreferences()->Node(QtPreferences::QT_STYLES_NODE);
QString styleName = prefs->Get(QtPreferences::QT_STYLE_NAME, "");
- QString fontName = prefs->Get(QtPreferences::QT_FONT_NAME, "");
- QString fontSize = prefs->Get(QtPreferences::QT_FONT_SIZE, "");
+ QString fontName = prefs->Get(QtPreferences::QT_FONT_NAME, "Open Sans");
+ QString fontSize = prefs->Get(QtPreferences::QT_FONT_SIZE, "9");
ctkServiceReference serviceRef = WorkbenchPlugin::GetDefault()->GetPluginContext()->getServiceReference();
if (serviceRef)
{
IQtStyleManager* styleManager = WorkbenchPlugin::GetDefault()->GetPluginContext()->getService(serviceRef);
styleManager->SetStyle(styleName);
styleManager->SetFont(fontName);
styleManager->SetFontSize(fontSize.toInt());
styleManager->UpdateWorkbenchFont();
}
QObject* eventFilter = new QtGlobalEventFilter(qApp);
qApp->installEventFilter(eventFilter);
}
}
diff --git a/Plugins/org.blueberry.ui.qt/src/internal/berryQtStylePreferencePage.cpp b/Plugins/org.blueberry.ui.qt/src/internal/berryQtStylePreferencePage.cpp
index 074756829e..dbb4e286bd 100644
--- a/Plugins/org.blueberry.ui.qt/src/internal/berryQtStylePreferencePage.cpp
+++ b/Plugins/org.blueberry.ui.qt/src/internal/berryQtStylePreferencePage.cpp
@@ -1,264 +1,264 @@
/*===================================================================
BlueBerry Platform
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#include "berryQtStylePreferencePage.h"
#include
#include
#include "berryWorkbenchPlugin.h"
#include
#include
#include
namespace berry
{
QtStylePreferencePage::QtStylePreferencePage()
{
}
void QtStylePreferencePage::Init(IWorkbench::Pointer )
{
}
void QtStylePreferencePage::CreateQtControl(QWidget* parent)
{
mainWidget = new QWidget(parent);
controls.setupUi(mainWidget);
berry::IPreferencesService* prefService = berry::WorkbenchPlugin::GetDefault()->GetPreferencesService();
ctkPluginContext* context = berry::WorkbenchPlugin::GetDefault()->GetPluginContext();
ctkServiceReference styleManagerRef = context->getServiceReference();
if (styleManagerRef)
{
styleManager = context->getService(styleManagerRef);
}
m_StylePref = prefService->GetSystemPreferences()->Node(berry::QtPreferences::QT_STYLES_NODE);
Update();
connect(controls.m_StylesCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(StyleChanged(int)));
connect(controls.m_FontComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(FontChanged(int)));
connect(controls.m_FontSizeSpinBox, SIGNAL(valueChanged(int)), this, SLOT(FontChanged(int)));
connect(controls.m_PathList, SIGNAL(itemSelectionChanged()), this, SLOT(UpdatePathListButtons()));
connect(controls.m_AddButton, SIGNAL(clicked(bool)), this, SLOT(AddPathClicked(bool)));
connect(controls.m_EditButton, SIGNAL(clicked(bool)), this, SLOT(EditPathClicked(bool)));
connect(controls.m_RemoveButton, SIGNAL(clicked(bool)), this, SLOT(RemovePathClicked(bool)));
}
void QtStylePreferencePage::FillStyleCombo(const berry::IQtStyleManager::Style& currentStyle)
{
controls.m_StylesCombo->clear();
styles.clear();
styleManager->GetStyles(styles);
qSort(styles);
for (int i = 0; i < styles.size(); ++i)
{
controls.m_StylesCombo->addItem(styles.at(i).name, QVariant(styles.at(i).fileName));
}
controls.m_StylesCombo->setCurrentIndex(styles.indexOf(currentStyle));
}
void QtStylePreferencePage::FillFontCombo(const QString& currentFont)
{
controls.m_FontComboBox->clear();
QStringList fonts;
styleManager->GetFonts(fonts);
for (int i = 0; i < fonts.size(); ++i)
{
controls.m_FontComboBox->addItem(fonts.at(i));
}
controls.m_FontComboBox->setCurrentIndex(fonts.indexOf(currentFont));
if (currentFont == QString("<>"))
{
controls.m_FontSizeSpinBox->setEnabled(false);
}
else
{
controls.m_FontSizeSpinBox->setEnabled(true);
}
}
void QtStylePreferencePage::AddPath(const QString& path, bool updateCombo)
{
if (!controls.m_PathList->findItems(path, Qt::MatchCaseSensitive).isEmpty()) return;
new QListWidgetItem(path, controls.m_PathList);
styleManager->AddStyles(path);
if (updateCombo)
FillStyleCombo(oldStyle);
}
void QtStylePreferencePage::StyleChanged(int /*index*/)
{
QString fileName = controls.m_StylesCombo->itemData(controls.m_StylesCombo->currentIndex()).toString();
styleManager->SetStyle(fileName);
}
void QtStylePreferencePage::FontChanged(int /*index*/)
{
QString fontName = controls.m_FontComboBox->currentText();
int fontSize = controls.m_FontSizeSpinBox->value();
if (fontName == QString("<>"))
{
controls.m_FontSizeSpinBox->setEnabled(false);
}
else
{
controls.m_FontSizeSpinBox->setEnabled(true);
}
styleManager->SetFont(fontName);
styleManager->SetFontSize(fontSize);
styleManager->UpdateWorkbenchFont();
}
void QtStylePreferencePage::AddPathClicked(bool /*checked*/)
{
QListWidgetItem* item = controls.m_PathList->currentItem();
QString initialDir;
if (item) initialDir = item->text();
QString dir = QFileDialog::getExistingDirectory(mainWidget, "", initialDir);
if (!dir.isEmpty()) this->AddPath(dir, true);
}
void QtStylePreferencePage::RemovePathClicked(bool /*checked*/)
{
QList selection = controls.m_PathList->selectedItems();
QListIterator it(selection);
while (it.hasNext())
{
QListWidgetItem* item = it.next();
QString dir = item->text();
controls.m_PathList->takeItem(controls.m_PathList->row(item));
delete item;
styleManager->RemoveStyles(dir);
}
if (!styleManager->Contains(oldStyle.fileName))
{
oldStyle = styleManager->GetDefaultStyle();
}
FillStyleCombo(oldStyle);
}
void QtStylePreferencePage::EditPathClicked(bool checked)
{
QListWidgetItem* item = controls.m_PathList->currentItem();
QString initialDir = item->text();
QString dir = QFileDialog::getExistingDirectory(mainWidget, "", initialDir);
if (!dir.isEmpty())
{
this->RemovePathClicked(checked);
this->AddPath(dir, true);
}
}
void QtStylePreferencePage::UpdatePathListButtons()
{
int s = controls.m_PathList->selectedItems().size();
if (s == 0)
{
controls.m_EditButton->setEnabled(false);
controls.m_RemoveButton->setEnabled(false);
}
else if (s == 1)
{
controls.m_EditButton->setEnabled(true);
controls.m_RemoveButton->setEnabled(true);
}
else
{
controls.m_EditButton->setEnabled(false);
controls.m_RemoveButton->setEnabled(true);
}
}
QWidget* QtStylePreferencePage::GetQtControl() const
{
return mainWidget;
}
bool QtStylePreferencePage::PerformOk()
{
m_StylePref->Put(berry::QtPreferences::QT_STYLE_NAME,
controls.m_StylesCombo->itemData(controls.m_StylesCombo->currentIndex()).toString());
QString paths;
for (int i = 0; i < controls.m_PathList->count(); ++i)
{
QString path = controls.m_PathList->item(i)->text() + ";";
paths += path;
}
m_StylePref->Put(berry::QtPreferences::QT_STYLE_SEARCHPATHS, paths);
m_StylePref->Put(berry::QtPreferences::QT_FONT_NAME,
controls.m_FontComboBox->currentText());
m_StylePref->Put(berry::QtPreferences::QT_FONT_SIZE,
QString::number(controls.m_FontSizeSpinBox->value()));
return true;
}
void QtStylePreferencePage::PerformCancel()
{
Update();
}
void QtStylePreferencePage::Update()
{
styleManager->RemoveStyles();
QString paths = m_StylePref->Get(berry::QtPreferences::QT_STYLE_SEARCHPATHS, "");
QStringList pathList = paths.split(";", QString::SkipEmptyParts);
QStringListIterator it(pathList);
while (it.hasNext())
{
AddPath(it.next(), false);
}
QString styleName = m_StylePref->Get(berry::QtPreferences::QT_STYLE_NAME, "");
styleManager->SetStyle(styleName);
oldStyle = styleManager->GetStyle();
FillStyleCombo(oldStyle);
- QString fontName = m_StylePref->Get(berry::QtPreferences::QT_FONT_NAME, "");
+ QString fontName = m_StylePref->Get(berry::QtPreferences::QT_FONT_NAME, "Open Sans");
styleManager->SetFont(fontName);
- int fontSize = m_StylePref->Get(berry::QtPreferences::QT_FONT_SIZE, "").toInt();
+ int fontSize = m_StylePref->Get(berry::QtPreferences::QT_FONT_SIZE, "9").toInt();
styleManager->SetFontSize(fontSize);
controls.m_FontSizeSpinBox->setValue(fontSize);
styleManager->UpdateWorkbenchFont();
FillFontCombo(styleManager->GetFont());
}
}
diff --git a/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabFolder.cpp b/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabFolder.cpp
index 692745d73a..b3e99f2608 100755
--- a/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabFolder.cpp
+++ b/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabFolder.cpp
@@ -1,363 +1,270 @@
/*===================================================================
BlueBerry Platform
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#include "berryNativeTabFolder.h"
#include "berryNativeTabItem.h"
#include "berryQCTabBar.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
-#include
#include
namespace berry
{
AbstractTabItem* NativeTabFolder::GetTab(int index)
{
return tabControl->getTab(index);
}
void NativeTabFolder::TabSelectionChanged(int index)
{
this->FireEvent(TabFolderEvent::EVENT_TAB_SELECTED, tabControl->getTab(index));
}
void NativeTabFolder::DragStarted(const QPoint& location)
{
this->HandleDragStarted(location);
}
void NativeTabFolder::ViewFormDestroyed(QObject*)
{
viewForm = nullptr;
content = nullptr;
}
NativeTabFolder::NativeTabFolder(QWidget* parent)
: QObject(parent)
{
content = nullptr;
viewForm = new QtControlWidget(parent, nullptr);
viewForm->setObjectName("ViewForm");
viewForm->installEventFilter(this);
- auto layout = new QVBoxLayout(viewForm);
+ auto layout = new QVBoxLayout;
layout->setContentsMargins(0,0,0,0);
layout->setSpacing(0);
viewForm->setLayout(layout);
connect(viewForm, SIGNAL(destroyed(QObject*)), this, SLOT(ViewFormDestroyed(QObject*)));
- auto topControls = new QWidget(viewForm);
- topControls->setMinimumSize(0, 24);
- topControls->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
- layout->addWidget(topControls);
- auto topLayout = new QHBoxLayout(topControls);
- topLayout->setContentsMargins(0, 0, 0, 0);
- topLayout->setSpacing(0);
-
- tabControl = new QCTabBar(topControls);
+ tabControl = new QCTabBar;
tabControl->installEventFilter(this);
- tabControl->setMinimumSize(0, 25);
- tabControl->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
- topLayout->addWidget(tabControl);
-
- auto topRightControls = new QFrame(topControls);
- topRightControls->setObjectName("TabTopRightControls");
- topRightControls->setMinimumSize(6, 25);
- topRightControls->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- topLayout->addWidget(topRightControls);
+ tabControl->setMinimumSize(0, 27);
+ tabControl->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
+ layout->addWidget(tabControl);
contentFrame = new QFrame(viewForm);
contentFrame->setObjectName("ViewFormContentFrame");
contentFrame->installEventFilter(this);
contentFrame->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- auto contentFrameLayout = new QVBoxLayout(contentFrame);
- contentFrameLayout->setContentsMargins(0,0,0,0);
+ auto contentFrameLayout = new QVBoxLayout(contentFrame);
+ contentFrameLayout->setContentsMargins(0, 0, 0, 0);
contentFrameLayout->setSpacing(0);
- //contentFrame->setLayout(layout);
-
layout->addWidget(contentFrame);
this->connect(tabControl, SIGNAL(currentChanged(int)), this,
SLOT(TabSelectionChanged(int)));
this->connect(tabControl, SIGNAL(dragStarted(const QPoint&)), this,
SLOT(DragStarted(const QPoint&)));
-
- //std::cout << "Created: viewForm <-- " << qPrintable(parent->objectName());
- //for (parent = parent->parentWidget(); parent != 0; parent = parent->parentWidget())
- // std::cout << " <-- " << qPrintable(parent->objectName());
- //std::cout << std::endl;
-
- //parent = viewForm;
- //std::cout << "Created control: QCTabBar <-- " << qPrintable(parent->objectName());
- //for (parent = parent->parentWidget(); parent != 0; parent = parent->parentWidget())
- // std::cout << " <-- " << qPrintable(parent->objectName());
- //std::cout << std::endl;
-
- //attachListeners(control, false);
-
- // viewForm = new ViewForm(control, SWT.FLAT);
- // attachListeners(viewForm, false);
- // systemToolbar = new StandardSystemToolbar(viewForm, true, false, true, true, true);
- // systemToolbar.addListener(systemToolbarListener);
- // viewForm.setTopRight(systemToolbar.getControl());
- //
- // topCenter = new ProxyControl(viewForm);
- // topCenterCache = new SizeCache();
- //
- // title = new CLabel(viewForm, SWT.LEFT);
- // attachListeners(title, false);
- // viewForm.setTopLeft(title);
-
ctkServiceReference serviceRef = WorkbenchPlugin::GetDefault()->GetPluginContext()->getServiceReference();
if (serviceRef)
{
skinManager = WorkbenchPlugin::GetDefault()->GetPluginContext()->getService(serviceRef);
}
}
NativeTabFolder::~NativeTabFolder()
{
if (!PlatformUI::GetWorkbench()->IsClosing())
{
BERRY_DEBUG << "Deleting viewForm";
if (content != nullptr)
{
content->setParent(nullptr);
}
viewForm->deleteLater();
}
}
bool NativeTabFolder::eventFilter(QObject* watched, QEvent* event)
{
if (event->type() == QEvent::MouseButtonPress)
{
QMouseEvent* mouseEvent = static_cast(event);
this->HandleMousePress(mouseEvent->pos());
}
return QObject::eventFilter(watched, event);
}
-void NativeTabFolder::UpdateColors()
-{
- QString tabStyle = this->GetActive() == 1 ? skinManager->GetActiveTabStylesheet() : skinManager->GetTabStylesheet();
-
- //tabControl->setStyleSheet(tabSkin);
- //contentFrame->setStyleSheet(tabSkin);
- viewForm->setStyleSheet(tabStyle);
-}
-
void NativeTabFolder::SetActive(int activeState)
{
AbstractTabFolder::SetActive(activeState);
this->UpdateColors();
}
+void NativeTabFolder::UpdateColors()
+{
+ viewForm->setStyleSheet(1 == this->GetActive()
+ ? skinManager->GetActiveTabStylesheet()
+ : skinManager->GetTabStylesheet());
+}
+
void NativeTabFolder::CloseButtonClicked(AbstractTabItem* item)
{
this->FireEvent(TabFolderEvent::EVENT_CLOSE, item);
}
QSize NativeTabFolder::ComputeSize(int /*widthHint*/, int /*heightHint*/)
{
return QSize(50,50);
}
AbstractTabItem* NativeTabFolder::Add(int index, int flags)
{
auto item = new NativeTabItem(this, index, flags);
return item;
}
void NativeTabFolder::Move(int from, int to)
{
int tabCount = tabControl->count();
if (to > tabCount) to = tabCount;
tabControl->moveAbstractTab(from, to);
}
void NativeTabFolder::Layout(bool flushCache)
{
AbstractTabFolder::Layout(flushCache);
-
-// QRect rect1 = tabControl->geometry();
-// QRect rect2 = viewForm->geometry();
-// std::cout << "QCTabBar geometry is: x=" << rect1.x() << ", y=" << rect1.y() << ", width=" << rect1.width() << ", height=" << rect1.height() << std::endl;
-// std::cout << "ViewForm geometry is: " << rect2.x() << ", y=" << rect2.y() << ", width=" << rect2.width() << ", height=" << rect2.height() << std::endl;
-
-// Rectangle oldBounds = viewForm.getBounds();
-// Rectangle newBounds = control.getClientArea();
-//
-// viewForm.setBounds(newBounds);
-//
-// if (Util.equals(oldBounds, newBounds))
-// {
-// viewForm.layout(flushCache);
-// }
}
QPoint NativeTabFolder::GetPaneMenuLocation()
{
return AbstractTabFolder::GetPaneMenuLocation();
- //return systemToolbar.getPaneMenuLocation();
}
void NativeTabFolder::SetState(int state)
{
AbstractTabFolder::SetState(state);
-
- //systemToolbar.setState(state);
}
QRect NativeTabFolder::GetClientArea()
{
if (content == nullptr)
{
return QRect();
}
return content->geometry();
}
QList NativeTabFolder::GetItems()
{
return tabControl->getTabs();
}
void NativeTabFolder::SetSelection(AbstractTabItem* toSelect)
{
if (toSelect == nullptr)
{
return;
}
tabControl->setCurrentTab(toSelect);
}
-void NativeTabFolder::SetSelectedInfo(const PartInfo& /*info*/)
+void NativeTabFolder::SetSelectedInfo(const PartInfo&)
{
-// if (!Util.equals(title.getText(), info.title))
-// {
-// title.setText(info.title);
-// }
-// if (title.getImage() != info.image)
-// {
-// title.setImage(info.image);
-// }
}
QRect NativeTabFolder::GetTabArea()
{
-
return tabControl->geometry();
-
-// Rectangle bounds = control.getBounds();
-//
-// Rectangle clientArea = control.getClientArea();
-//
-// bounds.x = 0;
-// bounds.y = 0;
-// Geometry.expand(bounds, 0, 0, -(clientArea.height + clientArea.y), 0);
-//
-// return Geometry.toDisplay(control.getParent(), bounds);
}
QWidget* NativeTabFolder::GetControl()
{
return viewForm;
}
-bool NativeTabFolder::IsOnBorder(const QPoint& /*globalPos*/)
+bool NativeTabFolder::IsOnBorder(const QPoint& )
{
-// Point localPos = getControl().toControl(globalPos);
-//
-// Rectangle clientArea = getClientArea();
-// return localPos.y > clientArea.y && localPos.y < clientArea.y
-// + clientArea.height;
return false;
}
AbstractTabItem* NativeTabFolder::GetSelection()
{
return tabControl->getCurrentTab();
}
QWidget* NativeTabFolder::GetContentParent()
{
return contentFrame;
}
void NativeTabFolder::SetContent(QWidget* newContent)
{
- //viewForm.setContent(newContent);
if (content != nullptr)
{
contentFrame->layout()->removeWidget(content);
disconnect(content);
}
content = newContent;
content->installEventFilter(this);
- //((QBoxLayout*)contentFrame->layout())->addWidget(content, 1);
contentFrame->layout()->addWidget(content);
}
QCTabBar* NativeTabFolder::GetTabFolder()
{
return tabControl;
}
-void NativeTabFolder::SetSelectedTitle(const QString& /*newTitle*/)
+void NativeTabFolder::SetSelectedTitle(const QString&)
{
- //title.setText(newTitle);
}
-void NativeTabFolder::SetSelectedImage(const QPixmap* /*image*/)
+void NativeTabFolder::SetSelectedImage(const QPixmap*)
{
- //title.setImage(image);
}
AbstractTabItem* NativeTabFolder::GetItem(const QPoint& toFind)
{
QPoint localPoint = tabControl->mapFromGlobal(toFind);
int index = tabControl->tabAt(localPoint);
if (index < 0)
return nullptr;
return tabControl->getTab(index);
}
-void NativeTabFolder::EnablePaneMenu(bool /*enabled*/)
+void NativeTabFolder::EnablePaneMenu(bool)
{
- //systemToolbar.enablePaneMenu(enabled);
}
}
diff --git a/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabFolder.h b/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabFolder.h
index 4717487387..5da3746924 100755
--- a/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabFolder.h
+++ b/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabFolder.h
@@ -1,230 +1,184 @@
/*===================================================================
BlueBerry Platform
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYNATIVETABFOLDER_H_
#define BERRYNATIVETABFOLDER_H_
#include
#include
class QFrame;
class QWidget;
namespace berry
{
struct IQtStyleManager;
class QCTabBar;
class NativeTabFolder: public QObject, public AbstractTabFolder
{
Q_OBJECT
private:
QCTabBar* tabControl;
QFrame* contentFrame;
QWidget* viewForm;
QWidget* content;
- // ViewForm viewForm;
- // StandardSystemToolbar systemToolbar;
- // CLabel title;
- // ProxyControl topCenter;
- // SizeCache topCenterCache;
-
- // IPropertyListener systemToolbarListener = new IPropertyListener() {
- //
- // public void propertyChanged(Object source, int propId) {
- // Point location;
- //
- // if (propId == TabFolderEvent.EVENT_PANE_MENU) {
- // location = getPaneMenuLocation();
- // } else {
- // location = new Point(0,0);
- // }
- //
- // fireEvent(propId, getSelection(), location);
- // }
- //
- // };
IQtStyleManager* skinManager;
/**
* @param item
* @return
*/
AbstractTabItem* GetTab(int index);
private slots:
void TabSelectionChanged(int index);
void DragStarted(const QPoint& location);
void ViewFormDestroyed(QObject*);
public:
NativeTabFolder(QWidget* parent);
~NativeTabFolder() override;
void UpdateColors();
void SetActive(int activeState) override;
bool eventFilter(QObject* watched, QEvent* event) override;
void CloseButtonClicked(AbstractTabItem* item);
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#computeSize(int, int)
*/
QSize ComputeSize(int widthHint, int heightHint) override;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#add(int)
*/
AbstractTabItem* Add(int index, int flags) override;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#move(int, int)
*/
void Move(int from, int to) override;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#layout(boolean)
*/
void Layout(bool flushCache) override;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#getPaneMenuLocation()
*/
QPoint GetPaneMenuLocation() override;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#setState(int)
*/
void SetState(int state) override;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#getClientArea()
*/
QRect GetClientArea();
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#getItems()
*/
QList GetItems() override;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#setSelection(org.blueberry.ui.internal.presentations.util.Widget)
*/
void SetSelection(AbstractTabItem* toSelect) override;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#setSelectedInfo(org.blueberry.ui.internal.presentations.util.PartInfo)
*/
void SetSelectedInfo(const PartInfo& info) override;
- // /* (non-Javadoc)
- // * @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#getToolbarParent()
- // */
- // Composite getToolbarParent() {
- // return viewForm;
- // }
-
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#getTabArea()
*/
QRect GetTabArea() override;
- // /* (non-Javadoc)
- // * @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#setToolbar(org.blueberry.swt.widgets.Control)
- // */
- // void setToolbar(Control toolbarControl) {
- //
- // if (toolbarControl != null) {
- // topCenterCache.setControl(toolbarControl);
- // topCenter.setTarget(topCenterCache);
- // viewForm.setTopCenter(topCenter.getControl());
- // } else {
- // topCenterCache.setControl(null);
- // topCenter.setTarget(null);
- // viewForm.setTopCenter(null);
- // }
- //
- // super.setToolbar(toolbarControl);
- // }
-
QWidget* GetControl() override;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#isOnBorder(org.blueberry.swt.graphics.Point)
*/
bool IsOnBorder(const QPoint& globalPos) override;
AbstractTabItem* GetSelection() override;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#getContentParent()
*/
QWidget* GetContentParent() override;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#setContent(org.blueberry.swt.widgets.Control)
*/
void SetContent(QWidget* newContent) override;
/**
* @return
* @since 3.1
*/
QCTabBar* GetTabFolder();
/**
* @param item
* @param newTitle
* @since 3.1
*/
/* protected */void SetSelectedTitle(const QString& newTitle);
/**
* @param image
* @since 3.1
*/
/* protected */void SetSelectedImage(const QPixmap* image);
using AbstractTabFolder::GetItem;
/* (non-Javadoc)
* @see org.blueberry.ui.internal.presentations.util.AbstractTabFolder#getItem(org.blueberry.swt.graphics.Point)
*/
AbstractTabItem* GetItem(const QPoint& toFind) override;
/**
* @param enabled
* @since 3.1
*/
void EnablePaneMenu(bool enabled) override;
};
}
#endif /* BERRYNATIVETABFOLDER_H_ */
diff --git a/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabItem.cpp b/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabItem.cpp
index a474ed3c6b..e3a8dfcdae 100755
--- a/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabItem.cpp
+++ b/Plugins/org.blueberry.ui.qt/src/internal/defaultpresentation/berryNativeTabItem.cpp
@@ -1,127 +1,127 @@
/*===================================================================
BlueBerry Platform
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#include "berryNativeTabItem.h"
#include "berryNativeTabFolder.h"
#include "berryQCTabBar.h"
+#include "berryQtStyleManager.h"
#include
#include
namespace berry
{
NativeTabItem::NativeTabItem(NativeTabFolder* _parent, int index, int flags) :
parent(_parent), style(flags), showClose(true), closeButton(nullptr)
{
parent->GetTabFolder()->insertTab(index, this);
if (this->GetShowClose())
{
parent->GetTabFolder()->setTabButton(index, QTabBar::RightSide, this->GetCloseButton());
this->connect(this->GetCloseButton(), SIGNAL(clicked()), this, SLOT(CloseButtonClicked()));
}
}
void NativeTabItem::CloseButtonClicked()
{
parent->CloseButtonClicked(this);
}
QRect NativeTabItem::GetBounds()
{
int index = parent->IndexOf(this);
QTabBar* folder = parent->GetTabFolder();
QRect localRect = folder->tabRect(index);
QPoint topLeft = localRect.topLeft();
QPoint bottomRight = localRect.bottomRight();
QPoint globalTopLeft = folder->mapToGlobal(topLeft);
QPoint globalBottomRight = folder->mapToGlobal(bottomRight);
return QRect(globalTopLeft, globalBottomRight);
}
void NativeTabItem::SetInfo(const PartInfo& info)
{
QTabBar* widget = parent->GetTabFolder();
int index = parent->IndexOf(this);
if (widget->tabText(index) != info.name)
{
widget->setTabText(index, info.name);
}
if (widget->tabToolTip(index) != info.toolTip)
{
widget->setTabToolTip(index, info.toolTip);
}
if (widget->tabIcon(index).cacheKey() != info.image.cacheKey())
{
widget->setTabIcon(index, info.image);
}
}
bool NativeTabItem::GetShowClose() const
{
return ((style & Constants::CLOSE) && showClose);
}
void NativeTabItem::SetShowClose(bool close)
{
showClose = close;
}
QWidget* NativeTabItem::GetCloseButton()
{
if (!closeButton)
- {
- QIcon iconCloseTab( ":/org.blueberry.ui.qt/tab_close_grey.svg" );
- iconCloseTab.addFile(":/org.blueberry.ui.qt/tab_close_grey_active.svg", QSize(), QIcon::Active);
+ {
+ QIcon iconCloseTab = QtStyleManager::ThemeIcon(QStringLiteral(":/org.blueberry.ui.qt/tab_close.svg"));
closeButton = new QToolButton(parent->GetControl());
closeButton->setObjectName("TabCloseButton");
closeButton->setContentsMargins(0, 0, 0, 0);
closeButton->setFixedSize(12,12);
closeButton->setIcon(iconCloseTab);
closeButton->setAutoRaise(true);
}
return closeButton;
}
void NativeTabItem::Dispose()
{
QTabBar* widget = parent->GetTabFolder();
int index = parent->IndexOf(this);
widget->removeTab(index); // this calls QCTabBar::tabRemoved
}
Object::Pointer NativeTabItem::GetData()
{
return data;
}
void NativeTabItem::SetData(Object::Pointer d)
{
this->data = d;
}
}
diff --git a/Plugins/org.blueberry.ui.qt/src/internal/util/berryAbstractTabFolder.h b/Plugins/org.blueberry.ui.qt/src/internal/util/berryAbstractTabFolder.h
index 756e7c4601..7a2e6b6ac9 100755
--- a/Plugins/org.blueberry.ui.qt/src/internal/util/berryAbstractTabFolder.h
+++ b/Plugins/org.blueberry.ui.qt/src/internal/util/berryAbstractTabFolder.h
@@ -1,265 +1,207 @@
/*===================================================================
BlueBerry Platform
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYABSTRACTTABFOLDER_H_
#define BERRYABSTRACTTABFOLDER_H_
#include
#include
#include "berryPartInfo.h"
#include "berryTabFolderEvent.h"
class QWidget;
namespace berry
{
class AbstractTabFolder
{
public:
Message1 tabFolderEvent;
private:
- // Control toolbar;
int state;
int activeState;
- // Listener menuListener = new Listener() {
- // /* (non-Javadoc)
- // * @see org.blueberry.swt.widgets.Listener#handleEvent(org.blueberry.swt.widgets.Event)
- // */
- // public void handleEvent(Event event) {
- // Point globalPos = new Point(event.x, event.y);
- // handleContextMenu(globalPos, event);
- // }
- // };
-
- // Listener dragListener = new Listener() {
- // public void handleEvent(Event e) {
- // Point globalPos = ((Control)e.widget).toDisplay(e.x, e.y);
- // handleDragStarted(globalPos, e);
- // }
- // };
-
- // MouseListener mouseListener = new MouseAdapter() {
- //
- // // If we single-click on an empty space on the toolbar, move focus to the
- // // active control
- // public void mouseDown(MouseEvent e) {
- // Point p = ((Control)e.widget).toDisplay(e.x, e.y);
- //
- // handleMouseDown(p, e);
- // }
- //
- //
- // // If we double-click on the toolbar, maximize the presentation
- // public void mouseDoubleClick(MouseEvent e) {
- // Point p = ((Control)e.widget).toDisplay(e.x, e.y);
- //
- // handleDoubleClick(p, e);
- // }
- // };
-
-
public:
AbstractTabFolder();
virtual ~AbstractTabFolder();
virtual QSize ComputeSize(int widthHint, int heightHint) = 0;
virtual AbstractTabItem* Add(int index, int flags) = 0;
virtual void Move(int from, int to) = 0;
virtual QWidget* GetContentParent() = 0;
virtual void SetContent(QWidget* newContent) = 0;
virtual QList GetItems() = 0;
virtual AbstractTabItem* GetSelection() = 0;
virtual void SetSelection(AbstractTabItem* toSelect) = 0;
virtual void SetSelectedInfo(const PartInfo& info) = 0;
virtual void EnablePaneMenu(bool enabled) = 0;
virtual void SetActive(int activeState);
virtual int GetActive();
/**
* Returns the location where the pane menu should be opened when activated
* by a keyboard shortcut (display coordinates)
*
* @return the location for the pane menu (display coordinates)
* @since 3.1
*/
virtual QPoint GetPaneMenuLocation();
/**
* Returns the location where the part list should be opened when activated
* by a keyboard shortcut (display coordinates)
*
* @return the location for the part list (display coordinates)
* @since 3.1
*/
virtual QPoint GetPartListLocation();
/**
* Returns the location where the pane menu should be opened when activated
* by a keyboard shortcut (display coordinates)
*
* @return the location for the pane menu (display coordinates)
* @since 3.1
*/
virtual QPoint GetSystemMenuLocation();
- // /**
- // * Returns the parent composite that should be used for creating the toolbar.
- // * Any control passed into setToolbar must have this composite as its parent.
- // *
- // * @return the parent composite that should be used for creating the toolbar
- // *
- // * @since 3.1
- // */
- // virtual QWidget* GetToolbarParent() = 0;
-
/**
* Returns the main control for this folder.
*
* @return the main control for the folder
* @since 3.1
*/
virtual QWidget* GetControl() = 0;
virtual AbstractTabItem* GetItem(int idx);
virtual AbstractTabItem* GetItem(const QPoint& toFind);
virtual AbstractTabItem* FindItem(Object::Pointer dataToFind);
/**
* Returns the index of the given item, or -1 if the given item is
* not found in this tab folder. Subclasses should override this if
* the underlying SWT widget has an equivalent method
*
* @param item item to find
* @return the index of the given item or -1
*/
virtual int IndexOf(AbstractTabItem* item);
virtual int GetItemCount();
/**
* Sets the current state for the folder
*
* @param state one of the IStackPresentationSite.STATE_* constants
*/
virtual void SetState(int state);
/**
* Returns the title area for this control (in the control's coordinate system)
*
* @return
*/
virtual QRect GetTabArea() = 0;
/**
* Called when the tab folder's shell becomes active or inactive. Subclasses
* can override this to change the appearance of the tabs based on activation.
*
* @param isActive
*/
virtual void ShellActive(bool isActive);
virtual void Layout(bool flushCache);
virtual void SetTabPosition(int tabPosition);
virtual int GetTabPosition();
virtual int GetState();
/**
* Returns true iff the given point is on the border of the folder.
* By default, double-clicking, context menus, and drag/drop are disabled
* on the folder's border.
*
* @param toTest a point (display coordinates)
* @return true iff the point is on the presentation border
* @since 3.1
*/
virtual bool IsOnBorder(const QPoint& toTest);
/**
* Set the folder to visible. This can be extended to propogate the
* visibility request to other components in the subclass.
*
* @param visible
* true
- the folder is visible.
* @since 3.2
*/
virtual void SetVisible(bool visible);
/**
* Cause the folder to hide or show its
* Minimize and Maximize affordances.
*
* @param show
* true
- the min/max buttons are visible.
* @since 3.3
*/
virtual void ShowMinMax(bool show);
protected:
friend class PresentablePartFolder;
void FireEvent(TabFolderEvent::Pointer e);
void FireEvent(int id);
void FireEvent(int id, AbstractTabItem* w);
void FireEvent(int id, AbstractTabItem* w, const QPoint& pos);
- // void attachSlots(QWidget* theControl) {
- // theControl.addListener(SWT.MenuDetect, menuListener);
- // theControl.addMouseListener(mouseListener);
- //
- // //TODO DnD
- // //PresentationUtil.addDragListener(theControl, dragListener);
- //
- // }
-
-
void HandleContextMenu(const QPoint& displayPos);
void HandleMousePress(const QPoint& displayPos);
void HandleDoubleClick(const QPoint& displayPos);
void HandleDragStarted(const QPoint& displayPos);
};
}
#endif /* BERRYABSTRACTTABFOLDER_H_ */
diff --git a/Plugins/org.mitk.gui.qt.ext/src/QmitkExtWorkbenchWindowAdvisor.cpp b/Plugins/org.mitk.gui.qt.ext/src/QmitkExtWorkbenchWindowAdvisor.cpp
index 2581bc7910..d48a43c423 100644
--- a/Plugins/org.mitk.gui.qt.ext/src/QmitkExtWorkbenchWindowAdvisor.cpp
+++ b/Plugins/org.mitk.gui.qt.ext/src/QmitkExtWorkbenchWindowAdvisor.cpp
@@ -1,1380 +1,1402 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#include "QmitkExtWorkbenchWindowAdvisor.h"
#include "QmitkExtActionBarAdvisor.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
// UGLYYY
#include "internal/QmitkExtWorkbenchWindowAdvisorHack.h"
#include "internal/QmitkCommonExtPlugin.h"
#include "mitkUndoController.h"
#include "mitkVerboseLimitedLinearUndo.h"
#include
+#include
#include
+#include
#include
#include
QmitkExtWorkbenchWindowAdvisorHack
* QmitkExtWorkbenchWindowAdvisorHack::undohack =
new QmitkExtWorkbenchWindowAdvisorHack();
QString QmitkExtWorkbenchWindowAdvisor::QT_SETTINGS_FILENAME = "QtSettings.ini";
static bool USE_EXPERIMENTAL_COMMAND_CONTRIBUTIONS = false;
class PartListenerForTitle: public berry::IPartListener
{
public:
PartListenerForTitle(QmitkExtWorkbenchWindowAdvisor* wa) :
windowAdvisor(wa)
{
}
Events::Types GetPartEventTypes() const override
{
return Events::ACTIVATED | Events::BROUGHT_TO_TOP | Events::CLOSED
| Events::HIDDEN | Events::VISIBLE;
}
void PartActivated(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref.Cast ())
{
windowAdvisor->UpdateTitle(false);
}
}
void PartBroughtToTop(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref.Cast ())
{
windowAdvisor->UpdateTitle(false);
}
}
void PartClosed(const berry::IWorkbenchPartReference::Pointer& /*ref*/) override
{
windowAdvisor->UpdateTitle(false);
}
void PartHidden(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (!windowAdvisor->lastActiveEditor.Expired() &&
ref->GetPart(false) == windowAdvisor->lastActiveEditor.Lock())
{
windowAdvisor->UpdateTitle(true);
}
}
void PartVisible(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (!windowAdvisor->lastActiveEditor.Expired() &&
ref->GetPart(false) == windowAdvisor->lastActiveEditor.Lock())
{
windowAdvisor->UpdateTitle(false);
}
}
private:
QmitkExtWorkbenchWindowAdvisor* windowAdvisor;
};
class PartListenerForViewNavigator: public berry::IPartListener
{
public:
PartListenerForViewNavigator(QAction* act) :
viewNavigatorAction(act)
{
}
Events::Types GetPartEventTypes() const override
{
return Events::OPENED | Events::CLOSED | Events::HIDDEN |
Events::VISIBLE;
}
void PartOpened(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref->GetId()=="org.mitk.views.viewnavigatorview")
{
viewNavigatorAction->setChecked(true);
}
}
void PartClosed(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref->GetId()=="org.mitk.views.viewnavigatorview")
{
viewNavigatorAction->setChecked(false);
}
}
void PartVisible(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref->GetId()=="org.mitk.views.viewnavigatorview")
{
viewNavigatorAction->setChecked(true);
}
}
void PartHidden(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref->GetId()=="org.mitk.views.viewnavigatorview")
{
viewNavigatorAction->setChecked(false);
}
}
private:
QAction* viewNavigatorAction;
};
class PartListenerForImageNavigator: public berry::IPartListener
{
public:
PartListenerForImageNavigator(QAction* act) :
imageNavigatorAction(act)
{
}
Events::Types GetPartEventTypes() const override
{
return Events::OPENED | Events::CLOSED | Events::HIDDEN |
Events::VISIBLE;
}
void PartOpened(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref->GetId()=="org.mitk.views.imagenavigator")
{
imageNavigatorAction->setChecked(true);
}
}
void PartClosed(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref->GetId()=="org.mitk.views.imagenavigator")
{
imageNavigatorAction->setChecked(false);
}
}
void PartVisible(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref->GetId()=="org.mitk.views.imagenavigator")
{
imageNavigatorAction->setChecked(true);
}
}
void PartHidden(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref->GetId()=="org.mitk.views.imagenavigator")
{
imageNavigatorAction->setChecked(false);
}
}
private:
QAction* imageNavigatorAction;
};
class PerspectiveListenerForTitle: public berry::IPerspectiveListener
{
public:
PerspectiveListenerForTitle(QmitkExtWorkbenchWindowAdvisor* wa) :
windowAdvisor(wa), perspectivesClosed(false)
{
}
Events::Types GetPerspectiveEventTypes() const override
{
if (USE_EXPERIMENTAL_COMMAND_CONTRIBUTIONS)
{
return Events::ACTIVATED | Events::SAVED_AS | Events::DEACTIVATED;
}
else
{
return Events::ACTIVATED | Events::SAVED_AS | Events::DEACTIVATED
| Events::CLOSED | Events::OPENED;
}
}
void PerspectiveActivated(const berry::IWorkbenchPage::Pointer& /*page*/,
const berry::IPerspectiveDescriptor::Pointer& /*perspective*/) override
{
windowAdvisor->UpdateTitle(false);
}
void PerspectiveSavedAs(const berry::IWorkbenchPage::Pointer& /*page*/,
const berry::IPerspectiveDescriptor::Pointer& /*oldPerspective*/,
const berry::IPerspectiveDescriptor::Pointer& /*newPerspective*/) override
{
windowAdvisor->UpdateTitle(false);
}
void PerspectiveDeactivated(const berry::IWorkbenchPage::Pointer& /*page*/,
const berry::IPerspectiveDescriptor::Pointer& /*perspective*/) override
{
windowAdvisor->UpdateTitle(false);
}
void PerspectiveOpened(const berry::IWorkbenchPage::Pointer& /*page*/,
const berry::IPerspectiveDescriptor::Pointer& /*perspective*/) override
{
if (perspectivesClosed)
{
QListIterator i(windowAdvisor->viewActions);
while (i.hasNext())
{
i.next()->setEnabled(true);
}
//GetViewRegistry()->Find("org.mitk.views.imagenavigator");
if(windowAdvisor->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.dicomeditor"))
{
windowAdvisor->openDicomEditorAction->setEnabled(true);
}
windowAdvisor->fileSaveProjectAction->setEnabled(true);
windowAdvisor->closeProjectAction->setEnabled(true);
windowAdvisor->undoAction->setEnabled(true);
windowAdvisor->redoAction->setEnabled(true);
windowAdvisor->imageNavigatorAction->setEnabled(true);
windowAdvisor->viewNavigatorAction->setEnabled(true);
windowAdvisor->resetPerspAction->setEnabled(true);
if( windowAdvisor->GetShowClosePerspectiveMenuItem() )
{
windowAdvisor->closePerspAction->setEnabled(true);
}
}
perspectivesClosed = false;
}
void PerspectiveClosed(const berry::IWorkbenchPage::Pointer& /*page*/,
const berry::IPerspectiveDescriptor::Pointer& /*perspective*/) override
{
berry::IWorkbenchWindow::Pointer wnd = windowAdvisor->GetWindowConfigurer()->GetWindow();
bool allClosed = true;
if (wnd->GetActivePage())
{
QList perspectives(wnd->GetActivePage()->GetOpenPerspectives());
allClosed = perspectives.empty();
}
if (allClosed)
{
perspectivesClosed = true;
QListIterator i(windowAdvisor->viewActions);
while (i.hasNext())
{
i.next()->setEnabled(false);
}
if(windowAdvisor->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.dicomeditor"))
{
windowAdvisor->openDicomEditorAction->setEnabled(false);
}
windowAdvisor->fileSaveProjectAction->setEnabled(false);
windowAdvisor->closeProjectAction->setEnabled(false);
windowAdvisor->undoAction->setEnabled(false);
windowAdvisor->redoAction->setEnabled(false);
windowAdvisor->imageNavigatorAction->setEnabled(false);
windowAdvisor->viewNavigatorAction->setEnabled(false);
windowAdvisor->resetPerspAction->setEnabled(false);
if( windowAdvisor->GetShowClosePerspectiveMenuItem() )
{
windowAdvisor->closePerspAction->setEnabled(false);
}
}
}
private:
QmitkExtWorkbenchWindowAdvisor* windowAdvisor;
bool perspectivesClosed;
};
class PerspectiveListenerForMenu: public berry::IPerspectiveListener
{
public:
PerspectiveListenerForMenu(QmitkExtWorkbenchWindowAdvisor* wa) :
windowAdvisor(wa)
{
}
Events::Types GetPerspectiveEventTypes() const override
{
return Events::ACTIVATED | Events::DEACTIVATED;
}
void PerspectiveActivated(const berry::IWorkbenchPage::Pointer& /*page*/,
const berry::IPerspectiveDescriptor::Pointer& perspective) override
{
QAction* action = windowAdvisor->mapPerspIdToAction[perspective->GetId()];
if (action)
{
action->setChecked(true);
}
}
void PerspectiveDeactivated(const berry::IWorkbenchPage::Pointer& /*page*/,
const berry::IPerspectiveDescriptor::Pointer& perspective) override
{
QAction* action = windowAdvisor->mapPerspIdToAction[perspective->GetId()];
if (action)
{
action->setChecked(false);
}
}
private:
QmitkExtWorkbenchWindowAdvisor* windowAdvisor;
};
QmitkExtWorkbenchWindowAdvisor::QmitkExtWorkbenchWindowAdvisor(berry::WorkbenchAdvisor* wbAdvisor,
berry::IWorkbenchWindowConfigurer::Pointer configurer) :
berry::WorkbenchWindowAdvisor(configurer),
lastInput(nullptr),
wbAdvisor(wbAdvisor),
showViewToolbar(true),
showPerspectiveToolbar(false),
showVersionInfo(true),
showMitkVersionInfo(true),
showViewMenuItem(true),
showNewWindowMenuItem(false),
showClosePerspectiveMenuItem(true),
viewNavigatorFound(false),
showMemoryIndicator(true),
dropTargetListener(new QmitkDefaultDropTargetListener)
{
productName = QCoreApplication::applicationName();
viewExcludeList.push_back("org.mitk.views.viewnavigatorview");
}
QmitkExtWorkbenchWindowAdvisor::~QmitkExtWorkbenchWindowAdvisor()
{
}
berry::ActionBarAdvisor::Pointer QmitkExtWorkbenchWindowAdvisor::CreateActionBarAdvisor(
berry::IActionBarConfigurer::Pointer configurer)
{
if (USE_EXPERIMENTAL_COMMAND_CONTRIBUTIONS)
{
berry::ActionBarAdvisor::Pointer actionBarAdvisor(
new QmitkExtActionBarAdvisor(configurer));
return actionBarAdvisor;
}
else
{
return berry::WorkbenchWindowAdvisor::CreateActionBarAdvisor(configurer);
}
}
QWidget* QmitkExtWorkbenchWindowAdvisor::CreateEmptyWindowContents(QWidget* parent)
{
QWidget* parentWidget = static_cast(parent);
auto label = new QLabel(parentWidget);
label->setText("No perspectives are open. Open a perspective in the Window->Open Perspective menu.");
label->setContentsMargins(10,10,10,10);
label->setAlignment(Qt::AlignTop);
label->setEnabled(false);
parentWidget->layout()->addWidget(label);
return label;
}
void QmitkExtWorkbenchWindowAdvisor::ShowClosePerspectiveMenuItem(bool show)
{
showClosePerspectiveMenuItem = show;
}
bool QmitkExtWorkbenchWindowAdvisor::GetShowClosePerspectiveMenuItem()
{
return showClosePerspectiveMenuItem;
}
void QmitkExtWorkbenchWindowAdvisor::ShowMemoryIndicator(bool show)
{
showMemoryIndicator = show;
}
bool QmitkExtWorkbenchWindowAdvisor::GetShowMemoryIndicator()
{
return showMemoryIndicator;
}
void QmitkExtWorkbenchWindowAdvisor::ShowNewWindowMenuItem(bool show)
{
showNewWindowMenuItem = show;
}
void QmitkExtWorkbenchWindowAdvisor::ShowViewToolbar(bool show)
{
showViewToolbar = show;
}
void QmitkExtWorkbenchWindowAdvisor::ShowViewMenuItem(bool show)
{
showViewMenuItem = show;
}
void QmitkExtWorkbenchWindowAdvisor::ShowPerspectiveToolbar(bool show)
{
showPerspectiveToolbar = show;
}
void QmitkExtWorkbenchWindowAdvisor::ShowVersionInfo(bool show)
{
showVersionInfo = show;
}
void QmitkExtWorkbenchWindowAdvisor::ShowMitkVersionInfo(bool show)
{
showMitkVersionInfo = show;
}
void QmitkExtWorkbenchWindowAdvisor::SetProductName(const QString& product)
{
productName = product;
}
void QmitkExtWorkbenchWindowAdvisor::SetWindowIcon(const QString& wndIcon)
{
windowIcon = wndIcon;
}
void QmitkExtWorkbenchWindowAdvisor::PostWindowCreate()
{
// very bad hack...
berry::IWorkbenchWindow::Pointer window =
this->GetWindowConfigurer()->GetWindow();
QMainWindow* mainWindow =
qobject_cast (window->GetShell()->GetControl());
if (!windowIcon.isEmpty())
{
mainWindow->setWindowIcon(QIcon(windowIcon));
}
mainWindow->setContextMenuPolicy(Qt::PreventContextMenu);
// Load icon theme
QIcon::setThemeSearchPaths(QStringList() << QStringLiteral(":/org_mitk_icons/icons/"));
QIcon::setThemeName(QStringLiteral("awesome"));
// ==== Application menu ============================
QMenuBar* menuBar = mainWindow->menuBar();
menuBar->setContextMenuPolicy(Qt::PreventContextMenu);
#ifdef __APPLE__
menuBar->setNativeMenuBar(true);
#else
menuBar->setNativeMenuBar(false);
#endif
auto basePath = QStringLiteral(":/org_mitk_icons/icons/awesome/scalable/actions/");
auto fileOpenAction = new QmitkFileOpenAction(berry::QtStyleManager::ThemeIcon(basePath + "document-open.svg"), window);
fileOpenAction->setShortcut(QKeySequence::Open);
auto fileSaveAction = new QmitkFileSaveAction(berry::QtStyleManager::ThemeIcon(basePath + "document-save.svg"), window);
fileSaveAction->setShortcut(QKeySequence::Save);
fileSaveProjectAction = new QmitkExtFileSaveProjectAction(window);
fileSaveProjectAction->setIcon(berry::QtStyleManager::ThemeIcon(basePath + "document-save.svg"));
closeProjectAction = new QmitkCloseProjectAction(window);
closeProjectAction->setIcon(berry::QtStyleManager::ThemeIcon(basePath + "edit-delete.svg"));
auto perspGroup = new QActionGroup(menuBar);
std::map VDMap;
// sort elements (converting vector to map...)
QList::const_iterator iter;
berry::IViewRegistry* viewRegistry =
berry::PlatformUI::GetWorkbench()->GetViewRegistry();
const QList viewDescriptors = viewRegistry->GetViews();
bool skip = false;
for (iter = viewDescriptors.begin(); iter != viewDescriptors.end(); ++iter)
{
// if viewExcludeList is set, it contains the id-strings of view, which
// should not appear as an menu-entry in the menu
if (viewExcludeList.size() > 0)
{
for (int i=0; iGetId())
{
skip = true;
break;
}
}
if (skip)
{
skip = false;
continue;
}
}
if ((*iter)->GetId() == "org.blueberry.ui.internal.introview")
continue;
if ((*iter)->GetId() == "org.mitk.views.imagenavigator")
continue;
if ((*iter)->GetId() == "org.mitk.views.viewnavigatorview")
continue;
std::pair p(
(*iter)->GetLabel(), (*iter));
VDMap.insert(p);
}
std::map::const_iterator
MapIter;
for (MapIter = VDMap.begin(); MapIter != VDMap.end(); ++MapIter)
{
berry::QtShowViewAction* viewAction = new berry::QtShowViewAction(window,
(*MapIter).second);
viewActions.push_back(viewAction);
}
if (!USE_EXPERIMENTAL_COMMAND_CONTRIBUTIONS)
{
QMenu* fileMenu = menuBar->addMenu("&File");
fileMenu->setObjectName("FileMenu");
fileMenu->addAction(fileOpenAction);
fileMenu->addAction(fileSaveAction);
fileMenu->addAction(fileSaveProjectAction);
fileMenu->addAction(closeProjectAction);
fileMenu->addSeparator();
QAction* fileExitAction = new QmitkFileExitAction(window);
fileExitAction->setIcon(berry::QtStyleManager::ThemeIcon(basePath + "system-log-out.svg"));
fileExitAction->setShortcut(QKeySequence::Quit);
fileExitAction->setObjectName("QmitkFileExitAction");
fileMenu->addAction(fileExitAction);
// another bad hack to get an edit/undo menu...
QMenu* editMenu = menuBar->addMenu("&Edit");
undoAction = editMenu->addAction(berry::QtStyleManager::ThemeIcon(basePath + "edit-undo.svg"),
"&Undo",
QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onUndo()),
QKeySequence("CTRL+Z"));
undoAction->setToolTip("Undo the last action (not supported by all modules)");
redoAction = editMenu->addAction(berry::QtStyleManager::ThemeIcon(basePath + "edit-redo.svg"),
"&Redo",
QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onRedo()),
QKeySequence("CTRL+Y"));
redoAction->setToolTip("execute the last action that was undone again (not supported by all modules)");
// ==== Window Menu ==========================
QMenu* windowMenu = menuBar->addMenu("Window");
if (showNewWindowMenuItem)
{
windowMenu->addAction("&New Window", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onNewWindow()));
windowMenu->addSeparator();
}
QMenu* perspMenu = windowMenu->addMenu("&Open Perspective");
QMenu* viewMenu = nullptr;
if (showViewMenuItem)
{
viewMenu = windowMenu->addMenu("Show &View");
viewMenu->setObjectName("Show View");
}
windowMenu->addSeparator();
resetPerspAction = windowMenu->addAction("&Reset Perspective",
QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onResetPerspective()));
if(showClosePerspectiveMenuItem)
closePerspAction = windowMenu->addAction("&Close Perspective", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onClosePerspective()));
windowMenu->addSeparator();
windowMenu->addAction("&Preferences...",
QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onEditPreferences()),
QKeySequence("CTRL+P"));
// fill perspective menu
berry::IPerspectiveRegistry* perspRegistry =
window->GetWorkbench()->GetPerspectiveRegistry();
QList perspectives(
perspRegistry->GetPerspectives());
skip = false;
for (QList::iterator perspIt =
perspectives.begin(); perspIt != perspectives.end(); ++perspIt)
{
// if perspectiveExcludeList is set, it contains the id-strings of perspectives, which
// should not appear as an menu-entry in the perspective menu
if (perspectiveExcludeList.size() > 0)
{
for (int i=0; iGetId())
{
skip = true;
break;
}
}
if (skip)
{
skip = false;
continue;
}
}
QAction* perspAction = new berry::QtOpenPerspectiveAction(window,
*perspIt, perspGroup);
mapPerspIdToAction.insert((*perspIt)->GetId(), perspAction);
}
perspMenu->addActions(perspGroup->actions());
if (showViewMenuItem)
{
for (auto viewAction : viewActions)
{
viewMenu->addAction(viewAction);
}
}
// ===== Help menu ====================================
QMenu* helpMenu = menuBar->addMenu("&Help");
helpMenu->addAction("&Welcome",this, SLOT(onIntro()));
helpMenu->addAction("&Open Help Perspective", this, SLOT(onHelpOpenHelpPerspective()));
helpMenu->addAction("&Context Help",this, SLOT(onHelp()), QKeySequence("F1"));
helpMenu->addAction("&About",this, SLOT(onAbout()));
// =====================================================
}
else
{
undoAction = new QmitkUndoAction(berry::QtStyleManager::ThemeIcon(basePath + "edit-undo.svg"), nullptr);
undoAction->setShortcut(QKeySequence::Undo);
redoAction = new QmitkRedoAction(berry::QtStyleManager::ThemeIcon(basePath + "edit-redo.svg"), nullptr);
redoAction->setShortcut(QKeySequence::Redo);
}
// toolbar for showing file open, undo, redo and other main actions
auto mainActionsToolBar = new QToolBar;
mainActionsToolBar->setObjectName("mainActionsToolBar");
mainActionsToolBar->setContextMenuPolicy(Qt::PreventContextMenu);
#ifdef __APPLE__
mainActionsToolBar->setToolButtonStyle ( Qt::ToolButtonTextUnderIcon );
#else
mainActionsToolBar->setToolButtonStyle ( Qt::ToolButtonTextBesideIcon );
#endif
basePath = QStringLiteral(":/org.mitk.gui.qt.ext/");
imageNavigatorAction = new QAction(berry::QtStyleManager::ThemeIcon(basePath + "image_navigator.svg"), "&Image Navigator", nullptr);
bool imageNavigatorViewFound = window->GetWorkbench()->GetViewRegistry()->Find("org.mitk.views.imagenavigator");
if(this->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.dicomeditor"))
{
openDicomEditorAction = new QmitkOpenDicomEditorAction(berry::QtStyleManager::ThemeIcon(basePath + "dicom.svg"), window);
}
if (imageNavigatorViewFound)
{
QObject::connect(imageNavigatorAction, SIGNAL(triggered(bool)), QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onImageNavigator()));
imageNavigatorAction->setCheckable(true);
// add part listener for image navigator
imageNavigatorPartListener.reset(new PartListenerForImageNavigator(imageNavigatorAction));
window->GetPartService()->AddPartListener(imageNavigatorPartListener.data());
berry::IViewPart::Pointer imageNavigatorView =
window->GetActivePage()->FindView("org.mitk.views.imagenavigator");
imageNavigatorAction->setChecked(false);
if (imageNavigatorView)
{
bool isImageNavigatorVisible = window->GetActivePage()->IsPartVisible(imageNavigatorView);
if (isImageNavigatorVisible)
imageNavigatorAction->setChecked(true);
}
imageNavigatorAction->setToolTip("Toggle image navigator for navigating through image");
}
viewNavigatorAction = new QAction(berry::QtStyleManager::ThemeIcon(QStringLiteral(":/org.mitk.gui.qt.ext/view-manager.svg")),"&View Navigator", nullptr);
viewNavigatorFound = window->GetWorkbench()->GetViewRegistry()->Find("org.mitk.views.viewnavigatorview");
if (viewNavigatorFound)
{
QObject::connect(viewNavigatorAction, SIGNAL(triggered(bool)), QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onViewNavigator()));
viewNavigatorAction->setCheckable(true);
// add part listener for view navigator
viewNavigatorPartListener.reset(new PartListenerForViewNavigator(viewNavigatorAction));
window->GetPartService()->AddPartListener(viewNavigatorPartListener.data());
berry::IViewPart::Pointer viewnavigatorview =
window->GetActivePage()->FindView("org.mitk.views.viewnavigatorview");
viewNavigatorAction->setChecked(false);
if (viewnavigatorview)
{
bool isViewNavigatorVisible = window->GetActivePage()->IsPartVisible(viewnavigatorview);
if (isViewNavigatorVisible)
viewNavigatorAction->setChecked(true);
}
viewNavigatorAction->setToolTip("Toggle View Navigator");
}
mainActionsToolBar->addAction(fileOpenAction);
mainActionsToolBar->addAction(fileSaveProjectAction);
mainActionsToolBar->addAction(closeProjectAction);
mainActionsToolBar->addAction(undoAction);
mainActionsToolBar->addAction(redoAction);
if(this->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.dicomeditor"))
{
mainActionsToolBar->addAction(openDicomEditorAction);
}
if (imageNavigatorViewFound)
{
mainActionsToolBar->addAction(imageNavigatorAction);
}
if (viewNavigatorFound)
{
mainActionsToolBar->addAction(viewNavigatorAction);
}
mainWindow->addToolBar(mainActionsToolBar);
// ==== Perspective Toolbar ==================================
auto qPerspectiveToolbar = new QToolBar;
qPerspectiveToolbar->setObjectName("perspectiveToolBar");
if (showPerspectiveToolbar)
{
qPerspectiveToolbar->addActions(perspGroup->actions());
mainWindow->addToolBar(qPerspectiveToolbar);
}
else
delete qPerspectiveToolbar;
if (showViewToolbar)
{
// Order view descriptors by category
QMultiMap categoryViewDescriptorMap;
for (auto labelViewDescriptorPair : VDMap)
{
auto viewDescriptor = labelViewDescriptorPair.second;
auto category = !viewDescriptor->GetCategoryPath().isEmpty()
? viewDescriptor->GetCategoryPath().back()
: QString();
categoryViewDescriptorMap.insert(category, viewDescriptor);
}
// Create a separate toolbar for each category
for (auto category : categoryViewDescriptorMap.uniqueKeys())
{
auto viewDescriptorsInCurrentCategory = categoryViewDescriptorMap.values(category);
if (!viewDescriptorsInCurrentCategory.isEmpty())
{
auto toolbar = new QToolBar;
toolbar->setObjectName(category + " View Toolbar");
mainWindow->addToolBar(toolbar);
if (!category.isEmpty())
- toolbar->addWidget(new QLabel(category + " "));
+ {
+ auto categoryButton = new QToolButton;
+ categoryButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
+ categoryButton->setText(category);
+ categoryButton->setStyleSheet("background: transparent; margin: 0; padding: 0;");
+ toolbar->addWidget(categoryButton);
+
+ connect(categoryButton, &QToolButton::clicked, [toolbar]()
+ {
+ for (QWidget* widget : toolbar->findChildren())
+ {
+ if (QStringLiteral("qt_toolbar_ext_button") == widget->objectName() && widget->isVisible())
+ {
+ QMouseEvent pressEvent(QEvent::MouseButtonPress, QPointF(0.0f, 0.0f), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+ QMouseEvent releaseEvent(QEvent::MouseButtonRelease, QPointF(0.0f, 0.0f), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+ QApplication::sendEvent(widget, &pressEvent);
+ QApplication::sendEvent(widget, &releaseEvent);
+ }
+ }
+ });
+ }
for (auto viewDescriptor : viewDescriptorsInCurrentCategory)
{
auto viewAction = new berry::QtShowViewAction(window, viewDescriptor);
toolbar->addAction(viewAction);
}
}
}
}
QSettings settings(GetQSettingsFile(), QSettings::IniFormat);
mainWindow->restoreState(settings.value("ToolbarPosition").toByteArray());
auto qStatusBar = new QStatusBar();
//creating a QmitkStatusBar for Output on the QStatusBar and connecting it with the MainStatusBar
auto statusBar = new QmitkStatusBar(qStatusBar);
//disabling the SizeGrip in the lower right corner
statusBar->SetSizeGripEnabled(false);
auto progBar = new QmitkProgressBar();
qStatusBar->addPermanentWidget(progBar, 0);
progBar->hide();
// progBar->AddStepsToDo(2);
// progBar->Progress(1);
mainWindow->setStatusBar(qStatusBar);
if (showMemoryIndicator)
{
auto memoryIndicator = new QmitkMemoryUsageIndicatorView();
qStatusBar->addPermanentWidget(memoryIndicator, 0);
}
}
void QmitkExtWorkbenchWindowAdvisor::PreWindowOpen()
{
berry::IWorkbenchWindowConfigurer::Pointer configurer = GetWindowConfigurer();
// show the shortcut bar and progress indicator, which are hidden by
// default
//configurer->SetShowPerspectiveBar(true);
//configurer->SetShowFastViewBars(true);
//configurer->SetShowProgressIndicator(true);
// // add the drag and drop support for the editor area
// configurer.addEditorAreaTransfer(EditorInputTransfer.getInstance());
// configurer.addEditorAreaTransfer(ResourceTransfer.getInstance());
// configurer.addEditorAreaTransfer(FileTransfer.getInstance());
// configurer.addEditorAreaTransfer(MarkerTransfer.getInstance());
// configurer.configureEditorAreaDropListener(new EditorAreaDropAdapter(
// configurer.getWindow()));
this->HookTitleUpdateListeners(configurer);
menuPerspectiveListener.reset(new PerspectiveListenerForMenu(this));
configurer->GetWindow()->AddPerspectiveListener(menuPerspectiveListener.data());
configurer->AddEditorAreaTransfer(QStringList("text/uri-list"));
configurer->ConfigureEditorAreaDropListener(dropTargetListener.data());
}
void QmitkExtWorkbenchWindowAdvisor::PostWindowOpen()
{
berry::WorkbenchWindowAdvisor::PostWindowOpen();
// Force Rendering Window Creation on startup.
berry::IWorkbenchWindowConfigurer::Pointer configurer = GetWindowConfigurer();
ctkPluginContext* context = QmitkCommonExtPlugin::getContext();
ctkServiceReference serviceRef = context->getServiceReference();
if (serviceRef)
{
mitk::IDataStorageService *dsService = context->getService(serviceRef);
if (dsService)
{
mitk::IDataStorageReference::Pointer dsRef = dsService->GetDataStorage();
mitk::DataStorageEditorInput::Pointer dsInput(new mitk::DataStorageEditorInput(dsRef));
mitk::WorkbenchUtil::OpenEditor(configurer->GetWindow()->GetActivePage(),dsInput);
}
}
}
void QmitkExtWorkbenchWindowAdvisor::onIntro()
{
QmitkExtWorkbenchWindowAdvisorHack::undohack->onIntro();
}
void QmitkExtWorkbenchWindowAdvisor::onHelp()
{
QmitkExtWorkbenchWindowAdvisorHack::undohack->onHelp();
}
void QmitkExtWorkbenchWindowAdvisor::onHelpOpenHelpPerspective()
{
QmitkExtWorkbenchWindowAdvisorHack::undohack->onHelpOpenHelpPerspective();
}
void QmitkExtWorkbenchWindowAdvisor::onAbout()
{
QmitkExtWorkbenchWindowAdvisorHack::undohack->onAbout();
}
//--------------------------------------------------------------------------------
// Ugly hack from here on. Feel free to delete when command framework
// and undo buttons are done.
//--------------------------------------------------------------------------------
QmitkExtWorkbenchWindowAdvisorHack::QmitkExtWorkbenchWindowAdvisorHack() : QObject()
{
}
QmitkExtWorkbenchWindowAdvisorHack::~QmitkExtWorkbenchWindowAdvisorHack()
{
}
void QmitkExtWorkbenchWindowAdvisorHack::onUndo()
{
mitk::UndoModel* model = mitk::UndoController::GetCurrentUndoModel();
if (model)
{
if (mitk::VerboseLimitedLinearUndo* verboseundo = dynamic_cast( model ))
{
mitk::VerboseLimitedLinearUndo::StackDescription descriptions =
verboseundo->GetUndoDescriptions();
if (descriptions.size() >= 1)
{
MITK_INFO << "Undo " << descriptions.front().second;
}
}
model->Undo();
}
else
{
MITK_ERROR << "No undo model instantiated";
}
}
void QmitkExtWorkbenchWindowAdvisorHack::onRedo()
{
mitk::UndoModel* model = mitk::UndoController::GetCurrentUndoModel();
if (model)
{
if (mitk::VerboseLimitedLinearUndo* verboseundo = dynamic_cast( model ))
{
mitk::VerboseLimitedLinearUndo::StackDescription descriptions =
verboseundo->GetRedoDescriptions();
if (descriptions.size() >= 1)
{
MITK_INFO << "Redo " << descriptions.front().second;
}
}
model->Redo();
}
else
{
MITK_ERROR << "No undo model instantiated";
}
}
// safe calls to the complete chain
// berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->FindView("org.mitk.views.imagenavigator");
// to cover for all possible cases of closed pages etc.
static void SafeHandleNavigatorView(QString view_query_name)
{
berry::IWorkbench* wbench = berry::PlatformUI::GetWorkbench();
if( wbench == nullptr )
return;
berry::IWorkbenchWindow::Pointer wbench_window = wbench->GetActiveWorkbenchWindow();
if( wbench_window.IsNull() )
return;
berry::IWorkbenchPage::Pointer wbench_page = wbench_window->GetActivePage();
if( wbench_page.IsNull() )
return;
auto wbench_view = wbench_page->FindView( view_query_name );
if( wbench_view.IsNotNull() )
{
bool isViewVisible = wbench_page->IsPartVisible( wbench_view );
if( isViewVisible )
{
wbench_page->HideView( wbench_view );
return;
}
}
wbench_page->ShowView( view_query_name );
}
void QmitkExtWorkbenchWindowAdvisorHack::onImageNavigator()
{
// show/hide ImageNavigatorView
SafeHandleNavigatorView("org.mitk.views.imagenavigator");
}
void QmitkExtWorkbenchWindowAdvisorHack::onViewNavigator()
{
// show/hide viewnavigatorView
SafeHandleNavigatorView("org.mitk.views.viewnavigatorview");
}
void QmitkExtWorkbenchWindowAdvisorHack::onEditPreferences()
{
QmitkPreferencesDialog _PreferencesDialog(QApplication::activeWindow());
_PreferencesDialog.exec();
}
void QmitkExtWorkbenchWindowAdvisorHack::onQuit()
{
berry::PlatformUI::GetWorkbench()->Close();
}
void QmitkExtWorkbenchWindowAdvisorHack::onResetPerspective()
{
berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->ResetPerspective();
}
void QmitkExtWorkbenchWindowAdvisorHack::onClosePerspective()
{
berry::IWorkbenchPage::Pointer
page =
berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage();
page->ClosePerspective(page->GetPerspective(), true, true);
}
void QmitkExtWorkbenchWindowAdvisorHack::onNewWindow()
{
berry::PlatformUI::GetWorkbench()->OpenWorkbenchWindow(nullptr);
}
void QmitkExtWorkbenchWindowAdvisorHack::onIntro()
{
bool hasIntro =
berry::PlatformUI::GetWorkbench()->GetIntroManager()->HasIntro();
if (!hasIntro)
{
QRegExp reg("(.*)(\\n)*");
QRegExp reg2("(\\n)*(.*)");
QFile file(":/org.mitk.gui.qt.ext/index.html");
file.open(QIODevice::ReadOnly | QIODevice::Text); //text file only for reading
QString text = QString(file.readAll());
file.close();
QString title = text;
title.replace(reg, "");
title.replace(reg2, "");
std::cout << title.toStdString() << std::endl;
QMessageBox::information(nullptr, title,
text, "Close");
}
else
{
berry::PlatformUI::GetWorkbench()->GetIntroManager()->ShowIntro(
berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow(), false);
}
}
void QmitkExtWorkbenchWindowAdvisorHack::onHelp()
{
ctkPluginContext* context = QmitkCommonExtPlugin::getContext();
if (context == nullptr)
{
MITK_WARN << "Plugin context not set, unable to open context help";
return;
}
// Check if the org.blueberry.ui.qt.help plug-in is installed and started
QList > plugins = context->getPlugins();
foreach(QSharedPointer p, plugins)
{
if (p->getSymbolicName() == "org.blueberry.ui.qt.help")
{
if (p->getState() != ctkPlugin::ACTIVE)
{
// try to activate the plug-in explicitly
try
{
p->start(ctkPlugin::START_TRANSIENT);
}
catch (const ctkPluginException& pe)
{
MITK_ERROR << "Activating org.blueberry.ui.qt.help failed: " << pe.what();
return;
}
}
}
}
ctkServiceReference eventAdminRef = context->getServiceReference();
ctkEventAdmin* eventAdmin = nullptr;
if (eventAdminRef)
{
eventAdmin = context->getService(eventAdminRef);
}
if (eventAdmin == nullptr)
{
MITK_WARN << "ctkEventAdmin service not found. Unable to open context help";
}
else
{
ctkEvent ev("org/blueberry/ui/help/CONTEXTHELP_REQUESTED");
eventAdmin->postEvent(ev);
}
}
void QmitkExtWorkbenchWindowAdvisorHack::onHelpOpenHelpPerspective()
{
berry::PlatformUI::GetWorkbench()->ShowPerspective("org.blueberry.perspectives.help",
berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow());
}
void QmitkExtWorkbenchWindowAdvisorHack::onAbout()
{
auto aboutDialog = new QmitkAboutDialog(QApplication::activeWindow(),nullptr);
aboutDialog->open();
}
void QmitkExtWorkbenchWindowAdvisor::HookTitleUpdateListeners(
berry::IWorkbenchWindowConfigurer::Pointer configurer)
{
// hook up the listeners to update the window title
titlePartListener.reset(new PartListenerForTitle(this));
titlePerspectiveListener.reset(new PerspectiveListenerForTitle(this));
editorPropertyListener.reset(new berry::PropertyChangeIntAdapter<
QmitkExtWorkbenchWindowAdvisor>(this,
&QmitkExtWorkbenchWindowAdvisor::PropertyChange));
// configurer.getWindow().addPageListener(new IPageListener() {
// public void pageActivated(IWorkbenchPage page) {
// updateTitle(false);
// }
//
// public void pageClosed(IWorkbenchPage page) {
// updateTitle(false);
// }
//
// public void pageOpened(IWorkbenchPage page) {
// // do nothing
// }
// });
configurer->GetWindow()->AddPerspectiveListener(titlePerspectiveListener.data());
configurer->GetWindow()->GetPartService()->AddPartListener(titlePartListener.data());
}
QString QmitkExtWorkbenchWindowAdvisor::ComputeTitle()
{
berry::IWorkbenchWindowConfigurer::Pointer configurer =
GetWindowConfigurer();
berry::IWorkbenchPage::Pointer currentPage =
configurer->GetWindow()->GetActivePage();
berry::IEditorPart::Pointer activeEditor;
if (currentPage)
{
activeEditor = lastActiveEditor.Lock();
}
QString title;
berry::IProduct::Pointer product = berry::Platform::GetProduct();
if (product.IsNotNull())
{
title = product->GetName();
}
if (title.isEmpty())
{
// instead of the product name, we use a custom variable for now
title = productName;
}
if(showMitkVersionInfo)
{
title += QString(" ") + MITK_VERSION_STRING;
}
if (showVersionInfo)
{
// add version informatioin
QString versions = QString(" (ITK %1.%2.%3 VTK %4.%5.%6 Qt %7 MITK %8)")
.arg(ITK_VERSION_MAJOR).arg(ITK_VERSION_MINOR).arg(ITK_VERSION_PATCH)
.arg(VTK_MAJOR_VERSION).arg(VTK_MINOR_VERSION).arg(VTK_BUILD_VERSION)
.arg(QT_VERSION_STR)
.arg(MITK_VERSION_STRING);
title += versions;
}
if (currentPage)
{
if (activeEditor)
{
lastEditorTitle = activeEditor->GetTitleToolTip();
if (!lastEditorTitle.isEmpty())
title = lastEditorTitle + " - " + title;
}
berry::IPerspectiveDescriptor::Pointer persp =
currentPage->GetPerspective();
QString label = "";
if (persp)
{
label = persp->GetLabel();
}
berry::IAdaptable* input = currentPage->GetInput();
if (input && input != wbAdvisor->GetDefaultPageInput())
{
label = currentPage->GetLabel();
}
if (!label.isEmpty())
{
title = label + " - " + title;
}
}
title += " (Not for use in diagnosis or treatment of patients)";
return title;
}
void QmitkExtWorkbenchWindowAdvisor::RecomputeTitle()
{
berry::IWorkbenchWindowConfigurer::Pointer configurer =
GetWindowConfigurer();
QString oldTitle = configurer->GetTitle();
QString newTitle = ComputeTitle();
if (newTitle != oldTitle)
{
configurer->SetTitle(newTitle);
}
}
void QmitkExtWorkbenchWindowAdvisor::UpdateTitle(bool editorHidden)
{
berry::IWorkbenchWindowConfigurer::Pointer configurer =
GetWindowConfigurer();
berry::IWorkbenchWindow::Pointer window = configurer->GetWindow();
berry::IEditorPart::Pointer activeEditor;
berry::IWorkbenchPage::Pointer currentPage = window->GetActivePage();
berry::IPerspectiveDescriptor::Pointer persp;
berry::IAdaptable* input = nullptr;
if (currentPage)
{
activeEditor = currentPage->GetActiveEditor();
persp = currentPage->GetPerspective();
input = currentPage->GetInput();
}
if (editorHidden)
{
activeEditor = nullptr;
}
// Nothing to do if the editor hasn't changed
if (activeEditor == lastActiveEditor.Lock() && currentPage == lastActivePage.Lock()
&& persp == lastPerspective.Lock() && input == lastInput)
{
return;
}
if (!lastActiveEditor.Expired())
{
lastActiveEditor.Lock()->RemovePropertyListener(editorPropertyListener.data());
}
lastActiveEditor = activeEditor;
lastActivePage = currentPage;
lastPerspective = persp;
lastInput = input;
if (activeEditor)
{
activeEditor->AddPropertyListener(editorPropertyListener.data());
}
RecomputeTitle();
}
void QmitkExtWorkbenchWindowAdvisor::PropertyChange(const berry::Object::Pointer& /*source*/, int propId)
{
if (propId == berry::IWorkbenchPartConstants::PROP_TITLE)
{
if (!lastActiveEditor.Expired())
{
QString newTitle = lastActiveEditor.Lock()->GetPartName();
if (lastEditorTitle != newTitle)
{
RecomputeTitle();
}
}
}
}
void QmitkExtWorkbenchWindowAdvisor::SetPerspectiveExcludeList(const QList& v)
{
this->perspectiveExcludeList = v;
}
QList QmitkExtWorkbenchWindowAdvisor::GetPerspectiveExcludeList()
{
return this->perspectiveExcludeList;
}
void QmitkExtWorkbenchWindowAdvisor::SetViewExcludeList(const QList& v)
{
this->viewExcludeList = v;
}
QList QmitkExtWorkbenchWindowAdvisor::GetViewExcludeList()
{
return this->viewExcludeList;
}
void QmitkExtWorkbenchWindowAdvisor::PostWindowClose()
{
berry::IWorkbenchWindow::Pointer window = this->GetWindowConfigurer()->GetWindow();
QMainWindow* mainWindow = static_cast (window->GetShell()->GetControl());
QSettings settings(GetQSettingsFile(), QSettings::IniFormat);
settings.setValue("ToolbarPosition", mainWindow->saveState());
}
QString QmitkExtWorkbenchWindowAdvisor::GetQSettingsFile() const
{
QFileInfo settingsInfo = QmitkCommonExtPlugin::getContext()->getDataFile(QT_SETTINGS_FILENAME);
return settingsInfo.canonicalFilePath();
}
diff --git a/Plugins/org.mitk.gui.qt.imagecropper/src/internal/ImageCropperControls.ui b/Plugins/org.mitk.gui.qt.imagecropper/src/internal/ImageCropperControls.ui
index af80674f8e..e45fe66627 100644
--- a/Plugins/org.mitk.gui.qt.imagecropper/src/internal/ImageCropperControls.ui
+++ b/Plugins/org.mitk.gui.qt.imagecropper/src/internal/ImageCropperControls.ui
@@ -1,1180 +1,1133 @@
ImageCropperControls
0
0
- 365
+ 329
863
0
0
QmitkTemplate
-
+
-
3
-
0
0
QLabel { color: rgb(255, 0, 0) }
Please select an image.
-
255
0
0
255
0
0
255
127
127
255
63
63
127
0
0
170
0
0
0
0
0
255
255
255
0
0
0
255
255
255
255
0
0
0
0
0
255
127
127
255
255
220
0
0
0
255
0
0
255
0
0
255
127
127
255
63
63
127
0
0
170
0
0
0
0
0
255
255
255
0
0
0
255
255
255
255
0
0
0
0
0
255
127
127
255
255
220
0
0
0
120
120
120
255
0
0
255
127
127
255
63
63
127
0
0
170
0
0
127
0
0
255
255
255
127
0
0
255
0
0
255
0
0
0
0
0
255
0
0
255
255
220
0
0
0
Please select a bounding object.
-
false
0
0
0
90
Bounding object
-
-
-
- 10
- 20
- 154
- 23
-
-
-
-
- 0
- 0
-
-
-
-
- 16777215
- 16777215
-
-
-
-
-
-
- 140
- 50
- 75
- 23
-
-
-
-
- 0
- 0
-
-
-
- Crop
-
-
-
-
-
- 10
- 50
- 75
- 23
-
-
-
-
- 0
- 0
-
-
-
- Do Cropping
-
-
- Mask
-
-
-
-
-
- 170
- 20
- 41
- 23
-
-
-
-
- 0
- 0
-
-
-
- New
-
-
+
+
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ New...
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Do Cropping
+
+
+ Mask
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Crop
+
+
+
+
-
true
255
0
0
255
0
0
255
127
127
255
63
63
127
0
0
170
0
0
255
0
0
255
255
255
0
0
0
255
255
255
255
0
0
0
0
0
255
127
127
255
255
220
0
0
0
255
0
0
255
0
0
255
127
127
255
63
63
127
0
0
170
0
0
255
0
0
255
255
255
0
0
0
255
255
255
255
0
0
0
0
0
255
127
127
255
255
220
0
0
0
127
0
0
255
0
0
255
127
127
255
63
63
127
0
0
170
0
0
127
0
0
255
255
255
127
0
0
255
0
0
255
0
0
0
0
0
255
0
0
255
255
220
0
0
0
Image geometry is rotated, result won't be pixel-aligned. You can reinit your image to get a pixel-aligned result, though.
Qt::PlainText
true
-
0
0
0
25
Advanced settings
false
100
Qt::ToolButtonTextBesideIcon
false
-
0
0
0
120
Output image settings
-
-
-
- 10
- 30
- 333
- 161
-
-
-
-
- QLayout::SetMaximumSize
-
-
- 10
-
-
-
-
-
- QLayout::SetMaximumSize
-
-
- 6
-
-
-
-
-
- Outside pixel value (masking):
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
-
- 16777210
- 16777215
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Overrride original image
-
-
- false
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Only crop current timestep
+
+
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Outside pixel value (masking):
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+
+ 16777210
+ 16777215
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Overrride original image
+
+
+ false
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Only crop current timestep
/ cut off other timesteps
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
+
+
+
+
-
Qt::Vertical
20
40
QmitkDataStorageComboBox
QComboBox
QmitkDataStorageComboBox.h
ctkExpandButton
QToolButton
diff --git a/Plugins/org.mitk.gui.qt.moviemaker/src/internal/QmitkScreenshotMakerControls.ui b/Plugins/org.mitk.gui.qt.moviemaker/src/internal/QmitkScreenshotMakerControls.ui
index ea3ecbd9a2..d406327559 100644
--- a/Plugins/org.mitk.gui.qt.moviemaker/src/internal/QmitkScreenshotMakerControls.ui
+++ b/Plugins/org.mitk.gui.qt.moviemaker/src/internal/QmitkScreenshotMakerControls.ui
@@ -1,279 +1,241 @@
QmitkScreenshotMakerControls
0
0
- 463
+ 315
368
ScreenshotMaker
-
-
- 5
-
-
- 0
-
-
- 5
-
-
- 0
-
-
- 25
-
- -
-
+
+
-
+
- 3D Screenshots
+ 2D Screenshots
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
-
- Writes screenshots of the 3D render window from 3 different angles.
-
-
- High-res Multiplanar Screenshot
-
+
+
-
+
+
-
+
+ axial
+
+
+ -
+
+ coronal
+
+
+ -
+
+ sagittal
+
+
-
-
-
-
- 0
- 0
-
-
-
-
-
-
- Writes a high resolution screenshot of the 3D render window.
-
+
- High-res Single Screenshot
+ Single
- -
-
-
- 1
-
-
- 5
+
-
+
+
+ Multiplanar
- -
-
+
+
+
+ -
+
+
+ 3D Screenshots (High-res)
+
+
+
-
+
- Upsampling:
+ Single
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ -
+
+
+ Multiplanar
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Upsampling:
+
+
+
+ -
+
+
+ 1
+
+
+ 4
+
+
+
+
+
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 31
-
-
-
-
- -
+
-
Options
-
-
-
+
+
-
30
- 0
+ 30
- 10
- 16777215
+ 30
+ 30
Rotate 3D camera 45° around x-axis.
x
- -
+
-
+
+
+ 30
+ 30
+
+
30
- 16777215
+ 30
Rotate 3D camera 45° around y-axis.
y
- -
+
-
+
+
+ 30
+ 30
+
+
30
- 16777215
+ 30
Rotate 3D camera 45° around z-axis.
z
- -
+
-
Qt::Horizontal
- 308
- 23
+ 36
+ 20
- -
+
-
Background Color:
- -
+
-
+
+
+ 30
+ 30
+
+
+
+
+ 30
+ 30
+
+
- -
-
-
- 2D Screenshots
+
-
+
+
+ Qt::Vertical
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
- Writes a screenshot of the selected (last clicked) render window.
-
-
- Single Screenshot
-
-
-
- -
-
-
- Writes screenshots of the axial, sagittal and coronal render window.
-
-
- Multiplanar Screenshot
-
-
-
- -
-
-
-
-
- axial
-
-
- -
-
- coronal
-
-
- -
-
- sagittal
-
-
-
-
-
-
+
+
+ 20
+ 31
+
+
+