From 10b12bbee9788fdb496cf339fa02cf2f0775a67c Mon Sep 17 00:00:00 2001
From: jojohoch <joachim.hoch@iqb.hu-berlin.de>
Date: Thu, 5 Jan 2023 09:36:00 +0100
Subject: [PATCH] [player] Remove padding image list items in drop list

---
 .../common/components/input-elements/drop-list.component.ts  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/projects/common/components/input-elements/drop-list.component.ts b/projects/common/components/input-elements/drop-list.component.ts
index 0328d89e3..845ad6789 100644
--- a/projects/common/components/input-elements/drop-list.component.ts
+++ b/projects/common/components/input-elements/drop-list.component.ts
@@ -52,6 +52,7 @@ import { FormElementComponent } from '../../directives/form-element-component.di
                  [style.font-weight]="elementModel.styling.bold ? 'bold' : ''"
                  [style.font-style]="elementModel.styling.italic ? 'italic' : ''"
                  [style.text-decoration]="elementModel.styling.underline ? 'underline' : ''"
+                 [style.padding.px]="dropListValueElement.imgSrc ? 0 : 10"
                  [style.background-color]="elementModel.styling.itemBackgroundColor">
               <span>{{dropListValueElement.text}}</span>
             </div>
@@ -76,7 +77,7 @@ import { FormElementComponent } from '../../directives/form-element-component.di
     '.list.floating-orientation {place-content: center space-around; align-items: center; flex-flow: row wrap;}',
     '.cloze-context.list {padding: 0;}',
     '.list-item {border-radius: 5px;}',
-    ':not(.cloze-context) .list-item {padding: 10px;}',
+    ':not(.cloze-context) :not(img).list-item {padding: 10px;}',
     '.cloze-context .list-item {padding: 0 5px;}',
     '.cloze-context .list-item span {margin-bottom: 3px;}',
     '.only-one-item .list-item {height: 100%; display: flex; align-items: center; justify-content: center;}',
@@ -85,7 +86,7 @@ import { FormElementComponent } from '../../directives/form-element-component.di
     '.error-message {font-size: 75%; margin-top: 10px; margin-left: 5px; position: absolute; pointer-events: none;}',
     '.cloze-context-error-message {padding: 0 !important;}',
     '.list-item:active {cursor: grabbing;}',
-    '.cdk-drag-preview {border-radius: 5px; box-shadow: 2px 2px 5px black; padding: 10px;}',
+    '.cdk-drag-preview {border-radius: 5px; box-shadow: 2px 2px 5px black;}',
     '.cdk-drop-list-dragging .cdk-drag {transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);}',
     '.highlight-receiver.cdk-drop-list-receiving {padding: 3px; border: 2px solid;}',
     '.cdk-drag-placeholder {background: #ccc; border: dotted 3px #999; min-height: 25px; min-width: 25px;}',
-- 
GitLab