Upgrade from v2015.12 to v2018.06

Viewing 20 posts - 1 through 20 (of 25 total)
  • Author
    Posts
  • #58154
    SzakiLaci
    Participant

      1.) First of all, MANY thanks for fixing TsImage problem πŸ™‚

      (That's why I'm upgrading now.)

      The new version finally shows ALL pictures, not just some πŸ™‚

      Before (old version BAD) / After (current version OK):

      [attachment=8821:TsImage_old.png] [attachment=8823:TsImage_new.png]

      BUT! A stretching problem still exist:

      – it should NOT load already cached/streched image and resize it!

      – it should get the ORIGINAL image (even if VirtualList is added)

      – I recommend to enhance the GetBitmap function with +1 parameter

      – EXCEPT:

      Code:
      ((Stretched=True) & (Proportional=False) & (“VirtList.Size” = “Self.Size”)) or (AutoSize=TRUE)

      (if the showing-size is the same as the Imagelist-size, than it can use the already cashed+streched image)

      BAD STRETCH:

      [attachment=8822:TsImage_Stretch.png]

      #58155
      SzakiLaci
      Participant

        2.) Creating non-skinned Panels worked before.

        Now it's trying to skin them always, no matter what I set:

        This was happening at 2015 version only in cases, when I've changed skins during runtime.

        Old version OK / New version BAD:

        [attachment=8825:Panels_old.png] [attachment=8824:Panels_new.png]

        Code:
        var
        P: TsPanel;
        begin
        P := TsPanel.Create(Foform);
        P.Parent := Holder_Panel; // this is a skinned panel
        P.SkinData.CustomColor := True;
        P.ParentFont := False;
        P.SkinData.CustomFont := True;
        //P.SkinData.SkinSection := ''; // old version worked by uncommenting this line
        P.Font.Color := $0092B4DC; // halvΓ‘ny barna

        #58156
        SzakiLaci
        Participant

          3.) TsTreeView does not show any more icons, only if selected.

          (associated with a TsVirtualImageList)

          Code:
          var nod : TTreeNode;

          nod.ImageIndex := 27;
          nod.SelectedIndex := nod.ImageIndex;
          nod.StateIndex := nod.ImageIndex;

          Old version (OK) / New version (BAD):

          [attachment=8826:TreeV_ikon_old.png] [attachment=8827:TreeV_ikon_new_no_icons.png]

          #58157
          SzakiLaci
          Participant

            4.) cConst.pas contained this before:

            Code:
            TsHackedControl = class(TControl)
            public
            property AutoSize;
            property ParentColor;
            property Color;
            property ParentFont;
            property PopupMenu;
            property Font;
            end;

            (You've wrote it, and helped me once with it… no time to search for that old topic now.)

            Old version (OK):

            [attachment=8828:Redish_bitBtn.png]

            At your (previous) recommendation I was able to color the background of a TsBitBtn with this code:

            Code:
            TsHackedControl(bbtn_orderAlert).Color := clRed;

            This is not available any more.

            Why did you delete it ? Is there any better way to do it?

            #58158
            SzakiLaci
            Participant

              5.) How do I turn OFF globally this new “auto-bitmap-coloring” on Cancel/Default buttons, etc…

              Searched both at sSkinManager and sSkinProvider, but did not find any property for it.

              Old (OK) / New (BAD):

              [attachment=8829:Cancel_color_old.png] [attachment=8830:Cancel_color_override.png]

              #58159
              SzakiLaci
              Participant

                6.) Finally the most important:

                Since 2012 I'm enhancing every version of sBitBtn with a “FocusedColor” property.

                (To show focus for users in NON-skinned state too).

                But I don't know how to implement this into the new version. πŸ™

                It became too complicated for me now.

                [attachment=8831:FocusedColor_of_TsBitBtn_non_Skinned.png]

                The previous code I've always used was this:

                Code:
                unit sBitBtn;

                TsBitBtn = class(TBitBtn)

                private
                FFocusedColor: TColor; // by Laci 2012.08

                public
                property FocusedColor : TColor read FFocusedColor write FFocusedColor default clLime; // by Laci 2012.08

                procedure TsBitBtn.StdDrawItem(const DrawItemStruct: TDrawItemStruct);

                if acThemesEnabled then begin

                else
                begin
                Flags := DFCS_BUTTONPUSH or DFCS_ADJUSTRECT;
                if IsDown then
                Flags := Flags or DFCS_PUSHED;

                if DrawItemStruct.itemState and ODS_DISABLED 0 then
                Flags := Flags or DFCS_INACTIVE;
                // DrawFrameControl doesn't allow for drawing a button as the default button, so it must be done here
                if IsFocused or IsDefault then begin
                Canvas.Pen.Color := clWindowFrame;
                Canvas.Pen.Width := 1;
                Canvas.Brush.Style := bsClear;
                Canvas.Brush.Color := FocusedColor; // by Laci 2012.08
                Canvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom);
                // DrawFrameControl must draw within this border
                InflateRect(R, -1, -1);
                end;
                // DrawFrameControl does not draw a pressed button correctly
                if IsDown then begin
                Canvas.Pen.Color := clBtnShadow;
                Canvas.Pen.Width := 1;
                Canvas.Brush.Color := FocusedColor;//clBtnFace; // by Laci 2012.08
                Canvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom);
                InflateRect(R, -1, -1);
                end
                else
                DrawFrameControl(DrawItemStruct.hDC, R, DFC_BUTTON, Flags);

                if IsFocused then begin
                R := ClientRect;
                InflateRect(R, -1, -1);
                end;
                Canvas.Font := Self.Font;
                if IsDown then
                OffsetRect(R, 1, 1);

                if IsFocused and IsDefault and ((SkinData.SkinManager = nil) or SkinData.SkinManager.ButtonsOptions.ShowFocusRect) then begin
                Canvas.Pen.Color := clWindowFrame; // Laci >>
                Canvas.Brush.Color := FocusedColor;//clBtnFace; // by Laci 2012.08
                InflateRect(R, -2, -2);
                Canvas.Rectangle(R); // << Laci
                R := ClientRect;
                InflateRect(R, -4, -4);
                Canvas.Pen.Color := clWindowFrame;
                Canvas.Brush.Color := clBtnFace;
                DrawFocusRect(Canvas.Handle, R);
                end;
                end;
                DrawCaption(Canvas);
                DrawBtnGlyph(Self, Canvas);

                Canvas.Handle := 0;
                Canvas.Free;
                end;
                end;

                #58160
                SzakiLaci
                Participant

                  I've just tried to send you a Donation via Skrill (Moneybookers) but it said:

                  “Transaction Failed

                  Recipient can not receive transactions at this time.

                  Please contact the recipient for more information.

                  ff8095b8-5869-4eaa-88e1-7a0dd4e1bc5d “

                  Did you cancel that account?

                  Can you try to re-login? (I had to renew my password via “forgotten psw” button)

                  #58162
                  Support
                  Keymaster

                    Hello!

                    I have sent request to the Skrill support, awaiting an answer now.

                    This topic is very big, answering to many question is not handy in the single topic…

                    6) The TsBitBtn control has the OnPaint event, maybe using this event will be better then adding of new property?

                    The code should not be changed after each new version release in this case…

                    #58163
                    Support
                    Keymaster

                      5) Use the sSkinManager.ButtonsOptions.ModalButtonsColoring property, you can disable this feature there.

                      4) The acntTypes unit has been added where the TsHackedControl type has been replaced by TacAccessControl, you should use this new type.

                      #58164
                      Support
                      Keymaster

                        3) I need a demo with this issue, can you make it?

                        #58165
                        Support
                        Keymaster

                          2) SkinData.SkinSection property may be empty in latest versions of the package.

                          They are empty by default and default section used for a painting of control.

                          If control should not be skinned, use any text which is not a name of section ('N/A' for sample).

                          #58166
                          Support
                          Keymaster

                            1) Can you show a demo for this issue?

                            #58204
                            SzakiLaci
                            Participant
                              'Support' wrote:

                              1) Can you show a demo for this issue?

                              Sorry for the late response, took me a while to prepare 2 test-demos…

                              1.) TsImage + TsAlphaImageList/TsVirtualImageList (stretch) problems:

                              download source+exe from here… sImageTest.zip (1.1M:cool:

                              2.) [Solved] Panel non-skinned paint works fine with: 'N/A' πŸ™‚

                              3.) sTreeViewTest.zip DEMO (1.9M:cool:

                              (VirtualList icons not showing, alpha not working, too much left-intent)

                              4.) [Solved] acntTypes.pas >> TsHackedControl(xyz) πŸ™‚

                              5.) [Solved] sSkinManager.ButtonsOptions.ModalButtonsColoring πŸ™‚

                              6.) > “TsBitBtn control has the OnPaint…”

                              That would be a very complicated and slow approach. :36:

                              – I have 1000+ BitBtns in my APP.

                              – only 1 running OnPaint makes debugging nearly impossible too, not to mention 20-50 on every form.

                              – every (60+) forms are already prepared with OnCreate(), like:

                              Code:
                              for i := 0 to f.ComponentCount-1 do begin
                              if f.Components is TsBitBtn then
                              TsBitBtn(f.Components).FocusedColor := clLime; // or clBlue on some forms…
                              end;

                              It would be a REALLY REALLY big help, if you could enhance TsBitBtn with “FocusedColor” property yourself,

                              with the code I've already presented. PLEASE! :a8:

                              (it won't hurt anyone else either, maybe they would benefit also…)

                              Edit3: sTreeViewTest DEMO added.

                              #58215
                              Support
                              Keymaster

                                Thank you for projects, I will check them soon.

                                #58256
                                SzakiLaci
                                Participant
                                  'Support' wrote:

                                  Thank you for projects, I will check them soon.

                                  Hi,

                                  Any news on those fixes maybe?

                                  Laci

                                  #58259
                                  Support
                                  Keymaster

                                    Hello

                                    Issues 2 and 3 are solved in the latest version.

                                    I'm thinking about the FocusedColor property, not sure this property will be used by other people.

                                    Maybe you can use a helper with new property there?

                                    #58282
                                    SzakiLaci
                                    Participant
                                      'Support' wrote:

                                      Hello

                                      Issues 2 and 3 are solved in the latest version.

                                      Hi,

                                      – I guess you mean 1+3 ? (because “2” has been solved at the beginning.) If yes >> that's very GREAT NEWS πŸ˜€ :a3:

                                      – There is still the 2018.07.08 version available for download only. Is there any new Beta so I could try?

                                      'Support' wrote:

                                      I'm thinking about the FocusedColor property, not sure this property will be used by other people.

                                      Maybe you can use a helper with new property there?

                                      There are 69 Main + 33 Sub-properties of this component.

                                      Do you think it would matter to have +1 ? .. even if nobody else would use it?

                                      If it stays on default color >> it would skip anyway, so nobody would “get hurt by it” πŸ˜†

                                      Code:
                                      If skin is turned OFF >> begin
                                      If FocusedColor = clBlack then begin
                                      … your code
                                      end
                                      else begin
                                      … // set background color of button instead of clBtnFace
                                      … // call standard drawing.
                                      end;
                                      end
                                      else begin …

                                      PS.: Sorry for the late response. I don't get any email alerts on these forum replays πŸ™

                                      PS2.: sent you a private msg about donation too.

                                      #58283
                                      Support
                                      Keymaster

                                        Hello!

                                        AC v13.18 has been released at 28.07.2018

                                        I will think about the FocusedColor property, how to make it better.

                                        #58286
                                        SzakiLaci
                                        Participant
                                          'Support' wrote:

                                          Hello!

                                          AC v13.18 has been released at 28.07.2018

                                          I will think about the FocusedColor property, how to make it better.

                                          Thank you VERY MUCH !! πŸ™‚

                                          I've thought the fixes happened AFTER that. I'll test it now.

                                          #58295
                                          SzakiLaci
                                          Participant

                                            I've just tested todays newest release: 13.19 Stable.

                                            I see many improvements, but it's still not complete:

                                            TsTreeView is still not properly drawing images.

                                            [attachment=8862:stretch_test2.png]

                                            ______________

                                            Setting AlphaImageList + VirtList Height or Width still takes several thousands of milliseconds!

                                            Which is totally unnecessary, since it's only a “virtual size” !!

                                            The only thing should happen during size-changing is:

                                            – clear prev. cached images

                                            – inform components using this (virt)imageList to “redraw” if visible. ( .invalidate is enough)

                                            What it should NOT do:

                                            – do not start any stretching operation!

                                            – do not redraw Images having “Stretched = True”

                                            I would solve all of these problems by creating and managing a List of components attached to each (virt-)ImageList.

                                            So you would know what needs to be “alerted of any change”. (resizing, picture replace, etc.)

                                            Code:
                                            type
                                            TattachedComponent = packed record
                                            obj : TsWinControl;
                                            type: enum … (sBitBtn, sImage, sTreeView …)
                                            end;

                                            _______________

                                            PNG files are stored in .dfm and .exe files still in HEXA format >> taking up 16x more space than the original image.

                                          Viewing 20 posts - 1 through 20 (of 25 total)
                                          • You must be logged in to reply to this topic.