Luciano França Posted January 2, 2023 Share Posted January 2, 2023 I managed to increase the font size but I need a way to increase the height of the TUniMenuItem due to the large icons that are cut off How could I do that in this code below ? Procedure P_SizeMenuUni(FormSelf: TComponent; MenuItem: TUniMenuItem); var I: Integer; fSize: Byte; MainMenuName: string; Begin fSize := 17; for I := 0 to MenuItem.Count - 1 do Begin MainMenuName := MenuItem[I].Name; UniSession.AddJS( 'Ext.onReady(function(){' + 'var id = ' + FormSelf.Name + '.' + MainMenuName + '.getItemId( )+"-btnInnerEl";' + 'Ext.util.CSS.createStyleSheet("#"+id+" { font-size: ' + IntToStr(fSize) + 'px; color: black}");' + '});' ); UniSession.AddJS( 'Ext.onReady(function(){' + 'var id = ' + FormSelf.Name + '.' + MenuItem[I].Name + '.getItemId( )+"-textEl";' + 'Ext.util.CSS.createStyleSheet("#"+id+" { font-size: ' + IntToStr(fSize) + 'px; color: black}");' + '});' ); P_SizeMenuUni(FormSelf, (MenuItem[I])); End; End; Quote Link to comment Share on other sites More sharing options...
Luciano França Posted January 4, 2023 Author Share Posted January 4, 2023 Someone ? An example of the problem attached. Grateful. Unigui Size Menus.7z Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 4, 2023 Share Posted January 4, 2023 Hello, We will try to check. Quote Link to comment Share on other sites More sharing options...
Luciano França Posted January 10, 2023 Author Share Posted January 10, 2023 On 04/01/2023 at 11:04, Sherzod said: Hello, We will try to check. Did the colleague manage to analyze it? Quote Link to comment Share on other sites More sharing options...
Luciano França Posted January 18, 2023 Author Share Posted January 18, 2023 Quote Hello, We will try to check. ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 18, 2023 Share Posted January 18, 2023 On 1/10/2023 at 4:41 PM, Luciano França said: Did the colleague manage to analyze it? Sorry, I haven't been able to find an optimal solution yet. Quote Link to comment Share on other sites More sharing options...
Luciano França Posted February 3, 2023 Author Share Posted February 3, 2023 On 1/18/2023 at 8:26 AM, Sherzod said: Sorry, I haven't been able to find an optimal solution yet. ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 4, 2023 Share Posted February 4, 2023 7 hours ago, Luciano França said: ? On 1/18/2023 at 4:26 PM, Sherzod said: Sorry, I haven't been able to find an optimal solution yet. Quote Link to comment Share on other sites More sharing options...
Luciano França Posted February 4, 2023 Author Share Posted February 4, 2023 9 hours ago, Sherzod said: Any alternative is welcome no matter how it can be a hack accessing protected methods. Grateful Quote Link to comment Share on other sites More sharing options...
Luciano França Posted February 14, 2023 Author Share Posted February 14, 2023 On 2/3/2023 at 11:37 PM, Sherzod said: Some position I am in need of this solution to publish an application for a client. Grateful Quote Link to comment Share on other sites More sharing options...
Luciano França Posted February 22, 2023 Author Share Posted February 22, 2023 ? Quote Link to comment Share on other sites More sharing options...
belo Posted February 25, 2023 Share Posted February 25, 2023 An alternative would be to change the CSS class. x-menu-item-text-default.x-menu-item-indent { margin-left: 48px; /* default 35px */ } .x-menu-item-text-default.x-menu-item-indent-no-separator { margin-left: 48px; /* default * 26px; */ } .x-menu-item-text-default { font: normal 13px helvetica, arial, verdana, sans-serif; line-height: 56px; /* default 23px */ padding-top: 1px; color: #000; cursor: pointer; } .x-menu-item-icon-default { width: 36px; /* default 16px */ height: 36px; /* default 16px */ top: 10px; /* default top: 4px; */ left: 5px; line-height: 16px; font-size: 16px; color: grey; background-position: center center; } Quote Link to comment Share on other sites More sharing options...
Luciano França Posted February 27, 2023 Author Share Posted February 27, 2023 On 2/24/2023 at 10:47 PM, belo said: An alternative would be to change the CSS class. x-menu-item-text-default.x-menu-item-indent { margin-left: 48px; /* default 35px */ } .x-menu-item-text-default.x-menu-item-indent-no-separator { margin-left: 48px; /* default * 26px; */ } .x-menu-item-text-default { font: normal 13px helvetica, arial, verdana, sans-serif; line-height: 56px; /* default 23px */ padding-top: 1px; color: #000; cursor: pointer; } .x-menu-item-icon-default { width: 36px; /* default 16px */ height: 36px; /* default 16px */ top: 10px; /* default top: 4px; */ left: 5px; line-height: 16px; font-size: 16px; color: grey; background-position: center center; } Thank you very much for this solution but just one question Where should I put this CSS ? i put in TUniServerModule.CustomCSS But the margin was bad even if I changed it to x-menu-item-text-default.x-menu-item-indent { margin-left: 98px; /* default 35px */ } .x-menu-item-text-default.x-menu-item-indent-no-separator { margin-left: 98px; /* default * 26px; */ } it didn't solve it. Tested in Google Chrome Versão 110.0.5481.105 (Versão oficial) 64 bits Quote Link to comment Share on other sites More sharing options...
Luciano França Posted March 1, 2023 Author Share Posted March 1, 2023 On 2/27/2023 at 10:15 AM, Luciano França said: Thank you very much for this solution but just one question Where should I put this CSS ? i put in TUniServerModule.CustomCSS But the margin was bad even if I changed it to x-menu-item-text-default.x-menu-item-indent { margin-left: 98px; /* default 35px */ } .x-menu-item-text-default.x-menu-item-indent-no-separator { margin-left: 98px; /* default * 26px; */ } it didn't solve it. Tested in Google Chrome Versão 110.0.5481.105 (Versão oficial) 64 bits I believe that I found the problem is in that line that lacked the "." at first x-menu-item-text-default.x-menu-item-indent { margin-left: 98px; /* default 35px */ } This is the complete solution for anyone who needs it. .x-btn-default-toolbar-small .x-btn-inner { font-size:14px; } .x-menu-item-text-default.x-menu-item-indent { margin-left: 38px; /* default 35px */ } .x-menu-item-text-default.x-menu-item-indent-no-separator { margin-left: 38px; /* default * 26px; */ } .x-menu-item-text-default { font: normal 14px helvetica, arial, verdana, sans-serif; line-height: 36px; /* default 23px */ padding-top: 1px; color: #000; cursor: pointer; } .x-menu-item-icon-default { width: 28px; /* default 16px */ height: 28px; /* default 16px */ top: 2px; /* default top: 4px; */ left: 5px; line-height: 14px; font-size: 14px; color: grey; background-position: center center; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.