<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      秋·風(fēng)

        博客園 :: 首頁 :: 博問 :: 閃存 :: 新隨筆 :: 聯(lián)系 :: 訂閱 訂閱 :: 管理 ::
      lazarus Object Inspector和combobox的下拉列表在linux時(shí)沒有高亮顯示選中的item,在windows是有高亮顯示的,按以下方法修改就可以,如果你有更有效的方法也請(qǐng)與我分享。
      (lazarus版本:3.2.4 for gtk2,FPC版本:3.2.2,操作系統(tǒng):銀河麒麟 v10sp1)
      windows版本是正常的:

       

       linux版本沒顯示選中的item,這是修正前:

      修正后:

      1、lazarus/lcl/include/customcombobox.inc

      將109行的procedure TCustomComboBox.DrawItem添加紅色代碼:
      procedure TCustomComboBox.DrawItem(Index: Integer; ARect: TRect;
        State: TOwnerDrawState);
      begin
        //TControlCanvas(FCanvas).UpdateTextFlags;
        //2022.05.28 LBZ
        {$ifdef linux}
        if (FDroppedDown) then
        begin
          if  (GetItemIndex=index)  then   //當(dāng)為ItemIndex時(shí)高亮顯示item
          begin
            FCanvas.Brush.Color := clHighlight;
            FCanvas.Font.Color :=  clHighlightText or clHighlight;
            FCanvas.FillRect(ARect);
          end;
          FCanvas.Font.Color:= clMenuText;
        end;
        {$endif}
        //2022.05.28 LBZ
        if Assigned(FOnDrawItem) then
          FOnDrawItem(Self, Index, ARect, State)
        else
        begin
          if not (odBackgroundPainted in State) then
            FCanvas.FillRect(ARect);
          InternalDrawItem(Self, FCanvas, ARect, Items[Index])
        end;
        invalidate;
      end;

      將1233行function TComboBoxStyleHelper.IsOwnerDrawn改為紅色代碼

      function TComboBoxStyleHelper.IsOwnerDrawn: Boolean;
      const
        ArrIsOwnerDrawn: array[TComboBoxStyle] of Boolean = (
          True, // csDropDown //LBZ =false 改為自繪模式 true  2023.2.16
          True, // csSimple   //LBZ =false 改為自繪模式 true  2023.2.16
          True, // csDropDownList //LBZ =false 改為自繪模式 true 2023.2.16
          True,  // csOwnerDrawFixed
          True,  // csOwnerDrawVariable
          True,  // csOwnerDrawEditableFixed
          True   // csOwnerDrawEditableVariable
        );
      begin
        Result := ArrIsOwnerDrawn[Self];
      end;

      2、lazarus/components/ideintf/objectinspector.pp
      將3517行的clWindowText改為clMenuText

      procedure TOICustomPropertyGrid.ValueComboBoxDrawItem(Control: TWinControl;
        Index: Integer; ARect: TRect; State: TOwnerDrawState);
      var
        CurRow: TOIPropertyGridRow;
        ItemValue: string;
        AState: TPropEditDrawState;
        FontColor: TColor;
      begin
        if (FItemIndex>=0) and (FItemIndex<FRows.Count) then begin
          CurRow:=Rows[FItemIndex];
          if (Index>=0) and (Index<ValueComboBox.Items.Count) then
            ItemValue:=ValueComboBox.Items[Index]
          else
            ItemValue:='';
          AState:=[];
          if odSelected in State then Include(AState,pedsSelected);
          if odFocused in State then Include(AState,pedsFocused);
          if odComboBoxEdit in State then
            Include(AState,pedsInEdit)
          else
            Include(AState,pedsInComboList);
      
          if not(odBackgroundPainted in State) then
            ValueComboBox.Canvas.FillRect(ARect);
      
          FontColor := ValueComboBox.Canvas.Font.Color;
          ValueComboBox.Canvas.Font.Assign(FDefaultValueFont);
          if odSelected in State then
            ValueComboBox.Canvas.Font.Color := FontColor
          else
            ValueComboBox.Canvas.Font.Color:= clMenuText;  //clWindowText LBZ 2023.2.16
          if CurRow.Editor.HasDefaultValue and (ItemValue = CurRow.Editor.GetDefaultValue) then
            ValueComboBox.Canvas.Font.Style := ValueComboBox.Canvas.Font.Style + [fsItalic];
          CurRow.Editor.ListDrawValue(ItemValue,Index,ValueComboBox.Canvas,ARect,AState);
        end;
      end;

       

      posted on 2023-02-17 11:00  秋·風(fēng)  閱讀(287)  評(píng)論(1)    收藏  舉報(bào)
      主站蜘蛛池模板: 97久久综合亚洲色hezyo| 亚洲暴爽av天天爽日日碰| 久久精品高清一区二区三区| 国产AV福利第一精品| 伦理片午夜视频在线观看| 国产中文字幕久久黄色片| 亚洲色大成网站WWW永久麻豆| 一区二区三区国产偷拍| 久久亚洲熟女cc98cm| 国产色悠悠综合在线观看 | 天天爽夜夜爽人人爽曰| 国产精品麻豆成人AV电影艾秋 | 国产蜜臀av在线一区二区| 亚洲中文字幕第一页在线| 日韩一区在线中文字幕| 亚洲熟妇自偷自拍另欧美| 久久午夜无码鲁丝片直播午夜精品| 污污污污污污WWW网站免费| 久久精品国产99久久6| 精品三级在线| 久久国产热这里只有精品| 亚洲成av人片在www色猫咪| 人妻中文字幕精品一页| 免费国产拍久久受拍久久| 国产精品青草久久久久福利99| 国产亚洲精久久久久久久91 | 国产精品ⅴ无码大片在线看| 欧美三级中文字幕在线观看| 日韩国产精品中文字幕| 99久久精品费精品国产| 国产一区二区三区AV在线无码观看| 中文字幕乱码人妻综合二区三区| 中文字幕亚洲人妻系列| 巩留县| 国产乱久久亚洲国产精品| 久久精品国产99国产精品严洲| 综合色在线| 亚洲国产精品毛片av不卡在线| 国产最新精品系列第三页| 18岁日韩内射颜射午夜久久成人 | 精河县|