MCPcopy Create free account
hub / github.com/SpartanJ/eepp / buildSidePanelTab

Method buildSidePanelTab

src/tools/ecode/plugins/git/gitplugin.cpp:1416–1765  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1414}
1415
1416void GitPlugin::buildSidePanelTab() {
1417 if ( mTabContents && !mTab ) {
1418 if ( mProjectPath.empty() )
1419 return;
1420 UIIcon* icon = findIcon( "source-control" );
1421 mTab = mSidePanel->add( i18n( "source_control", "Source Control" ), mTabContents,
1422 icon ? icon->getSize( PixelDensity::dpToPx( 12 ) ) : nullptr );
1423 mTab->setId( "source_control_tab" );
1424 mTab->setTextAsFallback( true );
1425 return;
1426 }
1427 if ( mTab )
1428 return;
1429 if ( mSidePanel == nullptr )
1430 getUISceneNode()->bind( "panel", mSidePanel );
1431 static constexpr auto STYLE = R"html(
1432 <style>
1433 #git_branches_tree ScrollBar,
1434 #git_status_tree ScrollBar {
1435 opacity: 0;
1436 transition: opacity 0.15;
1437 }
1438 #git_branches_tree:hover ScrollBar,
1439 #git_branches_tree ScrollBar.dragging,
1440 #git_branches_tree ScrollBar:focus-within,
1441 #git_status_tree:hover ScrollBar,
1442 #git_status_tree ScrollBar.dragging,
1443 #git_status_tree ScrollBar:focus-within {
1444 opacity: 1;
1445 }
1446 treeview::cell.git_highlight_style {
1447 color: %s;
1448 }
1449 treeview::row:selected treeview::cell.git_highlight_style,
1450 treeview::row:selected treeview::cell.git_highlight_style {
1451 color: var(--font-selected-pressed);
1452 tint: var(--font-selected-pressed);
1453 }
1454 treeview::cell.git_highlight_style > treeview::cell::icon {
1455 foreground-image: icon(circle, 8dpru), icon(circle-filled, 8dpru);
1456 foreground-position: 80%% 80%%, 80%% 80%%;
1457 foreground-tint: black, %s;
1458 }
1459 treeview::cell.git_highlight_style_clear > treeview::cell::icon {
1460 foreground-image: none, none;
1461 }
1462 </style>
1463 <RelativeLayout id="git_panel" lw="mp" lh="mp">
1464 <vbox id="git_content" lw="mp" lh="mp">
1465 <DropDownList id="git_panel_switcher" lw="mp" lh="22dp" border-type="inside" border-right-width="0" border-left-width="0" border-top-width="0" border-bottom-left-radius="0" border-bottom-right-radius="0" />
1466 <StackWidget id="git_panel_stack" lw="mp" lh="0" lw8="1">
1467 <vbox id="git_branches" lw="mp" lh="wc">
1468 <hbox lw="mp" lh="wc" padding="4dp">
1469 <DropDownList id="git_repo" lw="0" lh="wc" lw8="1" menu-width-mode="expand-if-needed" />
1470 <PushButton id="branch_pull" text="@string(git_pull, Pull)" tooltip="@string(pull_branch, Pull Branch)" text-as-fallback="true" icon="icon(repo-pull, 12dp)" margin-left="2dp" />
1471 <PushButton id="branch_push" text="@string(git_push, Push)" tooltip="@string(push_branch, Push Branch)" text-as-fallback="true" icon="icon(repo-push, 12dp)" margin-left="2dp" />
1472 <PushButton id="branch_add" text="@string(git_add_branch, Add Branch)" tooltip="@string(add_branch, Add Branch)" text-as-fallback="true" icon="icon(add, 12dp)" margin-left="2dp" />
1473 </hbox>

Callers

nothing calls this directly

Calls 15

repoPathMethod · 0.95
formatFunction · 0.85
hashFunction · 0.85
commitFunction · 0.85
setTextAsFallbackMethod · 0.80
loadLayoutFromStringMethod · 0.80
setExpandersAsIconsMethod · 0.80
getModelIndexMethod · 0.80
internalDataMethod · 0.80
asKeyEventMethod · 0.80
addListBoxItemsMethod · 0.80

Tested by

no test coverage detected