回退UI原SDk 3321/1 3321/head 3322/target/1
authorxue <2144439972@qq.com>
Wed, 1 Apr 2026 09:05:14 +0000 (17:05 +0800)
committerxue <2144439972@qq.com>
Wed, 1 Apr 2026 09:05:14 +0000 (17:05 +0800)
code/sdk/middleware/services/gui/uikit/proprietary/include/common/key_code.h
code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_label.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_label.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/engines/gfx/gfx_engine_manager.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/common/text.h

index c5a293c..8d8d0b0 100644 (file)
@@ -1,11 +1,3 @@
-/*
- * @Author: penglei 1624952103@qq.com
- * @Date: 2025-09-18 20:55:35
- * @LastEditors: penglei 1624952103@qq.com
- * @LastEditTime: 2025-09-23 12:02:40
- * @FilePath: /FD230/code/sdk/middleware/services/gui/uikit/proprietary/include/common/key_code.h
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- */
 /*
  * Copyright (c) 2022 CompanyNameMagicTag.
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -61,11 +53,6 @@ enum class ZliteKeyCode {
     ZLITE_KEY_AUDIO = ZLITE_KEY_CAT(FUNCTION, 0x2A),
     ZLITE_KEY_HOME = ZLITE_KEY_CAT(FUNCTION, 0x3F),
     ZLITE_KEY_FUNC = ZLITE_KEY_CAT(FUNCTION, 0x100),
-#ifdef LEINIAO
-    /* leiniao */
-    ZLITE_KEY_VENDOR_UP = ZLITE_KEY_CAT(FUNCTION, 0x110),
-    ZLITE_KEY_VENDOR_DOWN = ZLITE_KEY_CAT(FUNCTION, 0x111),
-#endif
 };
 }
 #endif
\ No newline at end of file
index 3374c9e..46d2df3 100644 (file)
@@ -59,72 +59,7 @@ void DrawLabel::DrawTextOneLine(BufferInfo& gfxDstBuffer, const LabelLineInfo& l
         }
     }
 }
-#ifdef BOARD_LEINIAO
-// 雷鸟项目增加,阴影Lable子组件
-void DrawLabel::DrawTextOneLineWithShadow(BufferInfo& gfxDstBuffer, const LabelLineInfo& labelLine, int16_t shadowOffsetX, int16_t shadowOffsetY)
-{
-    UIFont* fontEngine = UIFont::GetInstance();
-    Point textPos = labelLine.pos;
-    Point shadowPos = labelLine.pos;
-    
-    if (labelLine.direct == TEXT_DIRECT_RTL) {
-        textPos.x -= labelLine.offset.x;
-        shadowPos.x = textPos.x - shadowOffsetX;
-    } else {
-        textPos.x += labelLine.offset.x;
-        shadowPos.x = textPos.x + shadowOffsetX;
-    }
-    shadowPos.y = textPos.y + shadowOffsetY; // 向下偏移
 
-    uint32_t i = 0;
-    uint32_t letter;
-    uint16_t letterWidth;
-    ColorType shadowColor = Color::GetColorFromRGB(0x00, 0x00, 0x00); // 黑色阴影
-    
-    while (i < labelLine.lineLength) {
-        letter = TypedText::GetUTF8Next(labelLine.text, i, i);
-
-        // 先绘制阴影(向右偏移2像素,黑色)
-        LabelLetterInfo shadowLetterInfo{shadowPos,
-                                          labelLine.mask,
-                                          shadowColor,
-                                          labelLine.opaScale,
-                                          0,
-                                          0,
-                                          letter,
-                                          labelLine.direct,
-                                          labelLine.fontId,
-                                          0,
-                                          labelLine.fontSize,
-                                          labelLine.transMap};
-        DrawUtils::GetInstance()->DrawLetter(gfxDstBuffer, shadowLetterInfo);
-        
-        // 再绘制原始文字
-        LabelLetterInfo letterInfo{textPos,
-                                   labelLine.mask,
-                                   labelLine.style.textColor_,
-                                   labelLine.opaScale,
-                                   0,
-                                   0,
-                                   letter,
-                                   labelLine.direct,
-                                   labelLine.fontId,
-                                   0,
-                                   labelLine.fontSize,
-                                   labelLine.transMap};
-        DrawUtils::GetInstance()->DrawLetter(gfxDstBuffer, letterInfo);
-        
-        letterWidth = fontEngine->GetWidth(letter, 0);
-        if (labelLine.direct == TEXT_DIRECT_RTL) {
-            textPos.x -= (letterWidth + labelLine.style.letterSpace_);
-            shadowPos.x -= (letterWidth + labelLine.style.letterSpace_);
-        } else {
-            textPos.x += (letterWidth + labelLine.style.letterSpace_);
-            shadowPos.x += (letterWidth + labelLine.style.letterSpace_);
-        }
-    }
-}
-#endif
 
 void DrawLabel::DrawArcText(BufferInfo& gfxDstBuffer,
                             const Rect& mask,
index 13192f5..f497feb 100644 (file)
@@ -27,11 +27,6 @@ class DrawLabel : public HeapBase {
 public:
     static void DrawTextOneLine(BufferInfo& gfxDstBuffer, const LabelLineInfo& labelLine);
 
-    #ifdef BOARD_LEINIAO
-    // 雷鸟项目增加,阴影Lable子组件
-    static void DrawTextOneLineWithShadow(BufferInfo& gfxDstBuffer, const LabelLineInfo& labelLine, int16_t shadowOffsetX = 2, int16_t shadowOffsetY = 2);
-    #endif
-    
     static void DrawArcText(BufferInfo& gfxDstBuffer, const Rect& mask, const char* text,
                             const Point& arcCenter, uint8_t fontId, const UIArcLabel::ArcTextInfo arcTextInfo,
                             UIArcLabel::TextOrientation orientation, const Style& style, uint8_t opaScale);
index ef1e3bc..521f0ed 100644 (file)
@@ -150,13 +150,11 @@ public:
 
     virtual uint16_t GetScreenWidth()
     {
-        // return width_;
         return HORIZONTAL_RESOLUTION;
     }
 
     virtual uint16_t GetScreenHeight()
     {
-        // return height_;
         return VERTICAL_RESOLUTION;
     }
 
index c38cf0c..cc50e9b 100644 (file)
@@ -377,7 +377,7 @@ protected:
     };
 
     /** Maximum number of lines */
-    static constexpr uint16_t MAX_LINE_COUNT = 120;//label行高最高未120
+    static constexpr uint16_t MAX_LINE_COUNT = 70;
     static TextLine textLine_[MAX_LINE_COUNT];
 
     static constexpr int16_t TEXT_ELLIPSIS_DOT_NUM = 3;