FreeKill icon indicating copy to clipboard operation
FreeKill copied to clipboard

简单适配多字技能

Open waterfast opened this issue 1 year ago • 1 comments

waterfast avatar Aug 02 '24 17:08 waterfast

感觉没必要

顺便,当你打算给一个qml属性贴个比较复杂的、需要写个函数才能处理的逻辑时,没必要创建新函数(除非可以复用),比如你PR里面就能写成:

Text {
  font.pixelSize: {
    const len = text.length;
    if (len < 4) {  
      return Math.max(26 - len, 18);  
    } else if (len < 5) {  
      return 15;
    } else {  
      return 13;
    } 
  }
}

Notify-ctrl avatar Aug 12 '24 08:08 Notify-ctrl