Apply colour to menu and title bar - tcl

I would like to change the default colour of menu bar (and title). What would be the right approach?
As I understood, changing title bar color is at the moment not possible window's bar title option TCL/TK are there some workarounds in windows?
I tried without sucess to change the colour of atleast the menu bar. Below is a sample code
package require Tk
#§§§§§
# Start: Icons
#§§§§§
image create photo Icon_Exit -data {
iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAFMN540AAAABGdBTUEAAYagMeiWXwAAA8tJ
REFUSInFl01PG1cUhp87H0YVoMYZ27iVYAHlo2LTSpSEdFFIpULFRxYhP6C/IV11ESVZ5G9U
lbozrVSgLaYL3A0xKVIjRbQBGioRBRuPjasAauJh5mYx2MT22GMgVd+Vfee+57zn3HPPmYEK
CIDgD7syX3AAUADyBQc5HT1ZABAz6Up2EbGUJJaSfz63pHFz8bYCsD0e5v149sRGx49muVti
KellzUg+uqO8viCnozwdD8Nr27Xij7XPQohYGgTIG9GSTAFg3Fy87eXCaQokagXjspVvt6XT
pHs+LIm7YhxvkJTElR4WHOhpVdmdihQDPlG9mi3wZCLC1HK+2uyza210/WySLzioogFBWvDh
+l2k9EynANC+fiId3ZtdC8GH63c1AEfXqeW6JqSUSuXa4EUdOR3lcjFvtmR7PMzORASccvVa
JfnBnoWYSdPdqiKno2wd2nTMm26AiqhPRsLTiTABRSBiaQYu6sgbUfriWdb3j3zIQPtcxvUi
YDXvKqlwWoMsAFG90/E8rHNAGF/+cif/Qe+t05AUy+Loiy6hIWXN8vI1ciaWJ1nCH6OhspsO
buGEmqr9VJAlLZpgZzICtmthIKizctWgp0X1ISuCjnkTBdi51sZ7LSq/fWowtJRjOWf5kAEE
ROcy/GtLNsfC9MZNkh5EbzJwydDpbFbZOrRJfGKUQvAld7eoJK+6Urt+MhHHIVQmsYqsCtgY
C9MXz7pSBbwzlwFgbSxURS6rbVuC9l26XKWAd2d33XoXdchFA9X6PK5UpezTQnOaAgkj+eh0
LCFEjuKA/CoxrBSskVot9o1BCOEE9KX8veGEBqC8LAznP+y7ddab2SiUlx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3uZT6cBRYbcQpreQF
krKtZJFHgYIjn/WJuyK8p6nUxoBHUJ9z0fW8yq9+jPCe+vH8dkc9DDzO8lwVQbggTEdQqM10
VfOd3cA3ox4BbgP3XUcNTbmdzpCu7aYQQVgWQdifFXZL2CZg4VZYVpgF4DtwhMXiKS1cBf9R
h+U0jlbchklTAneBm7bFA4PAIdMiqiS3rj1CVaCmlSy04rYdpQjCXLtZLIe7kLEIwnipltTK
gDtvDlHsHiSLlkYaXh00PeYP7UW6FHdJx6bN3wNuaCVPLkXccC4sznQyCfQBb4GNwAOt5D7H
1nXgBHBAK1nXtLJayDimcNJvnvnYj4q5H8XZKD8+AzuIeVKYm+6q5lcJ4E2GrVPAaWAuPZHl
WAITwFfgA05zzHlRNBvlNwEdhRrd76/Iz2bqG4uPQ3eJh4GLwF7MBdHMsUVJK3kmrRRB+ArY
Us0znUVK7WvJOHyW/u6XWv1voJekUTfc5M0y3i2C8CqwwtHNAmutYM7qCPBOKzlkbvthYFQr
eatZRFmOp4CDQC1jDuAOyUrZgrlNcg1B8lIoAS8cW19wXhD/Ln4CQ7A8G4GVhN4AAAAASUVO
RK5CYII=
}
#
#§§§§§
# End: Icons
#§§§§§
#§§§§§
# Start: Menu Bar
#§§§§§
menu .menu_bar
. configure -menu .menu_bar
menu .level_0 -tearoff 0
.menu_bar add cascade -menu .level_0 -label "Menu" -underline 0
.level_0 add command -label "Resize App" -command {Resize_Win1} \
-image Icon_Resize -compound left
#
.level_0 add separator
.level_0 add command -label Exit -underline 0 -command {exit} \
-image Icon_Exit -compound left
.menu_bar configure -bg black -activebackground black \
-fg white -activeforeground white ;# effects not visible on GUI
#§§§§§
# End: Menu Bar
#§§§§§

Related

background color specific section wont change after adding content in custom description section of woocommerce using functions PHP

I have tried to add content in the custom description tag using a code in the functions php as seen below. I want to add a background color to this section, but the background color stays white (default).
I am using this code;
add_filter( 'the_content', 'wpglorify_custom_description_tab' );
function wpglorify_custom_description_tab( $content ){
if( is_product() ) {
$content .= '<p>[vc_section][vc_row full_width="stretch_row" equal_height="yes" content_placement="middle" fullwidth="1" css=".vc_custom_1648468332011{background-color: #f5f5f5 !important;}"][vc_column width="1/2" css=".vc_custom_1648468400351{margin-top: 50px !important;margin-bottom: 50px !important;}"][vc_column_text]
//content//
\[/vc_column_text\]\[/vc_column\]\[vc_column width="1/2" css=".vc_custom_1648468405860{margin-top: 50px !important;margin-bottom: 50px !important;}"\]\[vc_single_image image="3347" img_size="full" alignment="center"\]\[/vc_column\]\[/vc_row\]\[/vc_section\]</p>
';
}
return $content;
Can someone tell me what i am doing wrong?

How to get sub-menus to stay on the right side of a base menu?

I have a dynamically generated (in Angular) menu and sub menu items with a nested call to the same component. <div> elements create the container and also each menu item. I have some variables with 'V' and 'H' values that allow me to position the menu items Horizontally or Vertically by dynamically creating classes ending by H or V character - these are the css classes:
.menuContainer-V {
display: table;
}
.menuContainer-H {
display: inline-table;
}
.menuItemsContainer-H {
display: flex;
float: left;
flex-wrap: wrap;
}
That is all. (There is no class: "menuItemsContainer-V" because <div> items align naturally).
Here is what I would like to the layout to be:
"Menu A" will have class of: "menuContainer-V".
"Menu B" and all other menus will have class of: "menuContainer-H"
and the containers of their items - class: "menuItemsContainer-H".
At this time this works OK with the classes I specified above - EXCEPT - when the horizontal menu (e.g. "Menu C" has more items to reach the right edge of the view, it will jump to the left edge of the view - below "Menu A". Also, if more menus are produced, when they reach the bottom of "Menu A", they jump below "Menu A".
How can I get all other menus (Menus B, C, D, etc ...) stay on the right side from "Menu A" and never go under it?
Please remember that the component is called recursively (from itself) for each menu, so the container and its content (each menu and items) are re-generated dynamically, so that is the tricky part here from the CSS prospective.
Here is the template (HTML) code:
<!--
This is the first/base/root or the next selected switchboard menu.
If it has .subMenuItems[] - ynBaseItemHasSubMenus,
its sub-menu-items are the items/buttons of the menu
-->
<div [class]="swbPosClass"
[style.margin-top]="swbMarginTop"
[style.margin-left]="swbMarginLeft">
<!-- container of one given menu - including title -->
<div *ngIf="baseMenuItem"
[class]="menuContainerClass">
<!-- This is the header/title of the menu - comes from:
baseMenuItem.displayName -->
<div *ngIf="showMenuTitle && baseMenuItem.displayName"
[class]="headerClass"
(click)="clearChild()">
<!-- <span>{{baseMenuItem.displayName}} - L: {{level}}, {{menuPos}}</span> -->
<span>{{baseMenuItem.displayName}}</span>
<!-- This is a link/small icon to menu options -->
<span class="menu-icon" (click)="openSwbOptionsDialog()">⧎</span>
</div>
<!-- Base container for menu items - they come from .subMenuItems[]
This div serves as container for the Tree menu items
and for the NON-tree menus this div allows this css:
.menuContainer-V { display: table; }
display table properly - items are NOT stretched accross the screen,
instead, all items are sized equally to the width of the item
with longest content.
-->
<div *ngIf="ynBaseItemHasSubMenus">
<!-- Menu items container (for items without title)
arrange the menu items per the specified layout - H, V -->
<div [class]="menuItemsContainerClass">
<!-- menu items temp use: class="tmp4" -->
<div *ngFor="let item of baseMenuItem.subMenuItems; index as itemIx"
[class]="menuItemClasses"
(click)="onItemSelected(item)">
<mat-icon *ngIf="item.iconName"> {{item.iconName}} </mat-icon>
{{item.displayName}}
</div>
</div>
</div>
<!-- doc:
routedOutletPos: Position options for the menu (item's) target pages
1 - pages are displayed below or right from the last sub-menu,
according to the values of: menuPositioning.
The switchboard menus are remain shown / visible.
-->
<div *ngIf="isRoutedItem && routedOutletPos === 1">
<router-outlet></router-outlet>
</div>
</div>
</div>
<!-- doc:
For H or V (horizontal/vertical menus)
while we have sub-menu items we create sub-menus;
nested / recursive sub-menus based on users selection in prev. level item.
DANGER !!! DO NOT REMOVE: *ngIf="ynRecurse"
IT WOULD CAUSE ENDLESS LOOP - RESOURCES DEPLETED DANGER / BROWSER/SYSTEM CRASH
-->
<!-- <div *ngIf="ynRecurse" [class]="swbPosClass"> -->
<libtw-switchboard-a01 *ngIf="ynRecurse"
[baseMenuItem]="selectedItem"
[ynRecurse]="false"
[level]="level">
</libtw-switchboard-a01>
<!-- </div> -->
<!-- doc:
routedOutletPos: Position options for the menu (item's) target pages
2 - pages are displayed below the entire menu structure
- below all sub-menus.
The switchboard menus remain shown / visible.
-->
<div *ngIf="isRoutedItem && routedOutletPos === 2">
<router-outlet></router-outlet>
</div>

How can I display the current section name in a top dropdown nav using scrollspy?

I want to display the section's name on the dropdown tab using bootstrap scrollspy. When I scroll now, I only see section (which I would exclude) and I would like to see the current section in the dropdown bar as in when its not opened. So when I touch section 2 while scrolling I would like to see section 2 in the dropdown bar on top. At first, of course, I would like the bar to display section 1.
This is my code: https://codepen.io/alyssaalex/pen/rNNGrLy
I would appreciate it if someone could provide some help in this regard. Thanks!
You need to trigger an event on section change. And then get the section name and put on the dropdown title.
add this code in your JS
$(".navbar").on("activate.bs.scrollspy", function(){
$("#section_ddl").html('');
var sections = new Array("Section 1", "Section 2");
var x = $(".nav li.active > a").text();
if(sections.indexOf(x) != -1){
$("#section_ddl").html(x + '<span class="caret"></span>');
}
else {
$("#section_ddl").html('Section <span class="caret"></span>');
}
});
If you add/remove sections, you only need to put section names in the sections array.
Note: section_ddl is the id of the dropdown.
You can see the working example here

How Can I style the colors in the AVPlayerViewController Tab Bar Menu on Apple TV?

The AVPlayerViewController Tab Bar Menu on Apple TV is the following :
It appears when you swipe down on the control.
I want to change its background color to orange. Also I want to change the color of strings to orange when it's focused.
I was able to achieve this in a TabBarViewController's tab bar with the following code :
[UITabBarItem appearance] setTitleTextAttributes:#{ NSForegroundColorAttributeName : [UIColor whiteColor] }
forState:UIControlStateNormal];
[[UITabBarItem appearance] setTitleTextAttributes:#{ NSForegroundColorAttributeName : [UIColor orangeColor] }
forState:UIControlStateFocused];
[[UITabBar appearance] setBarTintColor:[UIColor blackColor]];
[[UITabBar appearance] setTintColor:[UIColor blackColor]];
How can I achieve this?

Navigation Bar Back Button Arrow Font Swift

So I manage to change the font of the back button as said in this post
but now I have two arrows(<), one is the back button default arrow and the other is the button title arrow ("< Back").
How do I remove/change the back button default arrow to the font want?
One way is to create a transparent graphic and set it as the background image of your Backbutton.
So your code should look like this:
let backButton = UIBarButtonItem(title: "< back", style: UIBarButtonItemStyle.Plain, target: self, action: nil)
backButton.setTitleTextAttributes([NSFontAttributeName: UIFont(name: "RobotoCondensed-Light", size: 20)!], forState: UIControlState.Normal)
backButton.setBackButtonBackgroundImage(UIImage(named: "transparent_1px.png"), forState: UIControlState.Normal, barMetrics: UIBarMetrics(rawValue: 0)!)
navigationItem.backBarButtonItem = backButton