Giter VIP home page Giter VIP logo

tbx's People

Contributors

plashenkov avatar sharov-artem avatar zedxxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tbx's Issues

Themes not displaying properly

Hi,

Does TBX use the VCL styles available in XE8? I tried changing the Appearance of the application to "Metropolis UI Green" and the TBX menus and buttons styles did not change?

Thanks,
Eric

TTBXColorItem Image Size is fixed.

I found TTBXColorItem image size is fixed to 16.

function TTBXColorItemViewer.GetImageSize: TSize;
begin
if IsToolbarStyle then
begin
Result.CX := 12;
Result.CY := 12;
end
begin
else
Result.CX := 16;
Result.CY := 16;
end;
end;

If you mix use TTBXColorItem and TTBXItem, and TTBXToolbar.Images is not a 16*16 icons.
It really ugly in some themes(TTBXToolbar.Images is 24 * 24).
tbx_bug
Can you make TTBXColorItem image size can be set from a property or auto adapt TTBXToolbar.Images size.

XE5 instalation on XE7 problem with hpp and TTBPopupPositionRec

TB2Item.HPP is generated, after patching it has stuct TTBPopupPositionRec.
But C++ compiler complains:
**
[bcc32 Error] TB2Item.hpp(157): E2019 'TTBPopupPositionRec:: :: :: ()' cannot be declared in an anonymous union
TB2Item.hpp(135): class TTBPopupPositionRec::
**
Here it is generated struct:

struct DECLSPEC_DRECORD TTBPopupPositionRec
{
    union
    {
        struct 
        {
            bool HorzHideSeparators;
            int HorzWrapOffset;
            TTBOrientation PopupOrientation;
        };
        struct 
        {
            bool PositionAsSubmenu;
            TTBPopupAlignment Alignment;
            bool Opposite;
            System::Types::TRect MonitorRect;
            System::Types::TRect ParentItemRect;
            int NCSizeX;
            int NCSizeY;
            int X;
            int Y;
            int W;
            int H;
            Tb2anim::TTBAnimationDirection AnimDir;
            bool PlaySound;
        };

    };
};

Individual Toolbar Height(s)

I do have various toolbars & tool-windows with different heights.

The question or suggestion is to have on the current Dock and on each ROW various toolbar heights without automatic toolbar/tool-window enlarging (in height).

Example:

  • Toolbar 1 has height 20
  • Toolbar 2 has height 30

If both are on Dock raw 0: all toolbar heights are altered to 30.

If each toolbar is on a different raw: each toolbar has its own height as by design as 20/30

In other words how to have different toolbar heights (without automatic resize) at a given raw...

Index of Theme Default" not found

I have installed TBX under Delphi7. When starting an older project I get an error message like "Index of Theme Default" not found.
Also when compiling packages I got an error message Theme % not found.
I installed everything according to the instructions.

Multimonitor-Problem with TBXMDI when MainForm on secondary monitor

Issue imported from Google Code:
https://code.google.com/p/tbxlib/issues/detail?id=3

Reported by bernd.ott [at] quantendrehung.de, Jan 30, 2013

You need at least two monitors.
put the primary monitor on left side.
the secondary monitor hast to be on right side and in a higher position in windows.

see screenshot

use an mdi application.
put tbxmdi on form.
put mainform on secondary monitor in maximized mode.
put mdichild in max. mode.
click mdi close button.

you get an exception:
Exception class: ERangeError
Exception address: 0064F929

Stack list, generated 30.01.2013 15:38:01
[0064F924] TBXMDI.TTBXMDIButtonsItem.ItemClick + $4C
[004033BE] System.ErrorAt + $16
[0064F924] TBXMDI.TTBXMDIButtonsItem.ItemClick + $4C
[005B1CC8] TB2Item.TTBCustomItem.Click + $A8
[005B1BA7] TB2Item.TTBCustomItem.ClickWndProc + $BB
[004303AC] Classes.StdWndProc + $14
[0049093C] Forms.TApplication.ProcessMessage + $FC
[00490976] Forms.TApplication.HandleMessage + $A
[00490C6B] Forms.TApplication.Run + $B3

mdiproblem


sorry, component is ttbxmdihandler


file tbxmdi fails at:
SendMessage(ChildForm.Handle, WM_SYSCOMMAND, Cmd, GetMessagePos);

GetMessagePos delivers a negative position.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms646360(v=vs.85).aspx

maybe that parameter can be 0 or -1. but that has to be testet


My suggest patch:

Index: TBXMDI.pas
===================================================================
--- TBXMDI.pas  (revision 19)
+++ TBXMDI.pas  (working copy)
@@ -286,7 +286,7 @@
   begin
     Form := Application.MainForm.ActiveMDIChild;
     if Assigned(Form) then
-      SendMessage(Form.Handle, WM_SYSCOMMAND, TTBXCustomItem(Sender).Tag, GetMessagePos);
+      SendMessage(Form.Handle, WM_SYSCOMMAND, TTBXCustomItem(Sender).Tag, -1);
   end;
 end;

@@ -606,7 +606,7 @@
         Cmd := SC_CLOSE
       else
         Cmd := SC_MINIMIZE;
-      SendMessage(ChildForm.Handle, WM_SYSCOMMAND, Cmd, GetMessagePos);
+      SendMessage(ChildForm.Handle, WM_SYSCOMMAND, Cmd, -1);
     end;
   end;
 end;

Delphi 10 Seattle instalation problem

When I trying install design package to DX Seattle I obtain error [dcc32 Fatal Error] TB2Reg.pas(94): F2613 Unit 'ImgEdit' not found. I add to additional compilator directives -LUDesignIDE bud compilation still results in an error. How can I add package to DX Seattle? Thank you, Pavel

TTBXLabel Paint bug on XE2

Issue imported from Google Code:
https://code.google.com/p/tbxlib/issues/detail?id=4

Reported by pavel [at] tresnakovi.cz, Apr 7, 2013

What steps will reproduce the problem?

  1. Place TPageControl on form
  2. Create new Page
  3. Place TTBXLabel on new Page of PageControl

Sometime is graphics bug (see on attached picture)

RAD studio XE2 (Upd4 HotFix1)

tbxlabel_paintbug


Replace this code to remove BUG in unit TBXDkPanels.

Message.wParam and Message.lParam are different types !

procedure TTBXPanelObject.WMEraseBkgnd(var Message: TMessage);
begin
  if not DoubleBuffered or (LPARAM(Message.wParam) = Message.lParam) then
  begin
    if Color = clNone then
      DrawParentBackground(Self, TWMEraseBkgnd(Message).DC, ClientRect)
    else
      FillRectEx(TWMEraseBkgnd(Message).DC, ClientRect, Color);
  end;
  Message.Result := 1;
end;

Copy/paste toolbar item from form-a to form-b

The copy of a toolbar-item from form-a and paste on form-b toolbar will fail (reader error):

  1. if the toolbar item has already an OnClick assigend.
  2. without any On-Properties there is no such issue!

Fix:

  1. The DsgnItemEditor needs your own DesignWindows.pas

  2. In the TDesignWindow add private error handler:

    procedure ReaderErrorHandler (Reader: TReader; const Message: string; var Handled: Boolean);

  3. Handler proc:

procedure TDesignWindow.ReaderErrorHandler (Reader: TReader; const Message: string; var Handled: Boolean);

Begin
ShowMessage ('Reader Error on component and property: >>' + Message + '<<');
Handled := True;
End;

  1. on procedure TDesignWindow.PasteComponents

add the OnError

try
  R.OnError   := ReaderErrorHandler;
  R.OnSetName := ReaderSetName;

Why is TBXImageList is not a part of TBX

We use old version of TBX 2.2 alpha (with some fixes) which was include design-time component TTBXImageList. I wanted to start using your version of TBX but I found that this component is missing.

So, I want to ask you why is it missing and is it possible to include it?

TBX 2.2 alpha: https://torry.net/files/vcl/bars/toolbars/tbx22alpha.zip

TBXImageList is 4 units:

  • Design\TBXImgListEdit.pas
  • TBXGraphics.pas <-- class TTBXImageList is here
  • TBXGraphicsPNG.pas
  • TBXGraphicsZLIB.pas

This component still works for Delphi 2007 to latest Rio 10.3.2 (for Win32 target only).

TBXImageList_Rio.zip (with some minor fixes for Rio).

Element sizes on High-Definition Displays (Windows scaling is 200% or above) DPI is not 96

Thank you for maintaining the great TBX software.

Please consider adding support for High-definition monitors. Nowadays, lot of users have Windows interface scaling level set to 200% and more, to accommodate to 4K displays, so the screen density is no longer 96 DPI. In Toolbar2000, all item sizes are programmed in physical pixels, not adjusted to screen DPI, so the items like toolbar grips, chevrons, arrows look very small.

So the adjustments are needed to multiply element size to actual screen DPI and divide by 96 (normal DPI). It is usually obtaining by using MulDiv instruction.

For example, see how GetTBXDragHandleSize from TBXThemes.pas will look like:

function GetTBXDragHandleSize(const ADC: HDC; const ToolbarInfo: TTBXToolbarInfo): Integer;
const
FDragHandleSizes: array [Boolean, 0..2] of Integer = ((9, 0, 6), (14, 14, 14));
begin
with ToolbarInfo do
begin
if AllowDrag then
Result := MulDiv(FDragHandleSizes[(CloseButtonState and CDBS_VISIBLE) <> 0, DragHandleStyle], GetDeviceCaps(ADC, LOGPIXELSY), 96)
else
Result := 0;
end;
end;

Please consider adding support for custom DPI, other than 96, to accommodate modern high resolution monitors.

I have made a few changes to the code, but it would be better if you fully implement custom DPI support in the main code base.

Thank you very much again for maintaining the TBX library.

Floating Toolbar/DockPanels with Resizable & Win 10

As it goes for an 13 th...

If you use a floating & resizable toolbar and/or dockpanel on Win 10 (resizable = false is OK!!) the NC caption get's ugly with a WHITE bar at the top of the Toolwindow.

image

Currently I am working to fix it, but looks ugly while on

  1. All Themes: Border.Y := GetSystemMetrics(YMetrics[Resizable]) is not used to a common function

  2. also the NC caption drawing requires adapation

while the ugly part on Win 10 and new Windows-Themes, the border width is now 1 pixel and may also Windows- Themes dependent.

Installation to C++ Builder 6

Hello!

Compatible with Delphi/C++Builder 4โ€“XE5.

but Packages folder couldn't contain packages for C++ Builder. How to install this TBX to Builder?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.