已处理 Scroll控件,当moveX=1时,末尾控件的内容没有显示完全

状态
不接受进一步回复。
这里的未分类,很明显缺了边框,已尝试多种办法,均无法解决
1783832125934.webp
浠沥沥 浠沥沥 入我回忆:
扩展 折叠 复制
          分类滑块:
            type: Texture
            val: 分类滑块
            attribute:
              x: 56
              y: 192
              width: 40
              height: 4
              normal: ~120,120,120,200
              maxDragX: 308
          分类滚动:
            type: Scroll
            attribute:
              x: 56
              y: 148
              width: 350
              height: 40
              moveX: self.parent['分类滑块'].getDragXRatio()
            action:
              wheel: |-
                if(self.moveX >= 0 && self.wheelValue > 0){
                  self.parent['分类滑块'].setDragXRatio((self.moveX - self.wheelValue * 0.1).round(1))
                  Message.chat(self.moveX)
                }
                if(self.moveX <= 1 && self.wheelValue < 0){
                  self.parent['分类滑块'].setDragXRatio((self.moveX - self.wheelValue * 0.1).round(1))
                  Message.chat(self.moveX)
                }
            children:
              分类列表:
                val: cat_list
                type: HStack
                attribute:
                  height: 40
                  spaceBetween: 10
                action:
                  create: |-
                    for(i in range(0, 8)){
                      item = self['分类模板'].copy('分类项' + i.round())
                      item.entryKey = none
                    }
                children:
                  分类模板:
                    type: Texture
                    attribute:
                      width: 100
                      height: 40
                      normal: ~145,145,145,255
                      shape: ~round_rect
                      radius: 12
                    effect:
                      stroke:
                        width: 2
                        color: ~0,0,0,255
 
该问题和超出范围同源,但是修复后仅减小误差和修复对称,在实际使用过程中,仍然会超出一部分,因为mc的剪裁只支持整数,这是对其进行补偿
 
状态
不接受进一步回复。