Search This Blog

Metric ⇄ Imperial Converter

 

Recently, I built a small desktop app that helps engineers, designers, and anyone working with mixed measurement systems quickly convert lengths between metric and imperial units.


⚙️ Key Features
Converts mm, cm, m ↔ inches, feet (decimal), feet-inches (format 0’0″)
Works both directions — metric ⇄ imperial
Smart input recognition: 5’7″, 5ft 7in, 5 7, or even 5-7.25
Quick calculation via CALCULATE button or Enter key
Keeps a conversion history in the same window
Compact, minimal interface built with Tkinter

🌍 Two Interface Versions
English version
Russian version
Both fully localized and identical in functionality.

🔢 Conversion Examples

1 m → 3’3.37″
5’7″ → 170.18 cm
100 mm → 3.94″
6.5 ft → 6’6″


💬 Feedback is welcome — what do you think about this idea?


English version: https://lnkd.in/g2CWKYfe


Russian version: https://lnkd.in/gShd_vff


UPD

🔧 Updated My Metric  Imperial Converter (v2). What’s New?

I’ve redesigned and released a new version of my compact metric–imperial converter. The program now has a more streamlined interface, cleaner logic, and improved usability for everyday work.

Below is a list of all major updates and new features.

🆕 1. Ultra-Compact Interface

Version v1 used a wide, three-column layout (input → output → history).
In v2, the interface is completely redesigned:

  • Narrow vertical window (200×480 px)
  • All elements arranged in a single column
  • Minimal padding, compact fonts
  • Perfect for keeping the converter always on screen

📌 2. New Unit Selectors (Comboboxes)

Instead of radio buttons, the new version uses Combobox dropdowns:

  • Saves space
  • Faster unit switching
  • Shows all units together

A new key/label dictionary structure also makes the code cleaner.

🔄 3. Automatic Recalculation

No need to press a button anymore.
If the input field contains a value, it:

  • recalculates automatically when the input/output unit changes
  • updates the result
  • adds a new line to history

A real speed boost during active work.

✨ 4. Improved History Panel

  • Uses Consolas 9 pt for perfectly aligned output
  • Added context menu:
    • Cut
    • Copy
    • Paste
    • Select All
  • Proper autoscroll

The previous version had no editing features at all — history was “locked” and basic.

📏 5. Better Feet–Inches Parser

Both versions support formats like:

  • 5’7″
  • 5 7
  • 5 ft 7 in
  • 5-7.5
  • 5;7
  • 5.5′

But the new version:

  • is faster
  • uses a cleaner parsing function
  • improves _pretty_in() formatting
  • handles imperfect inputs more safely

🖥 6. New Menu Bar

Added menu commands:

  • Calc. — quick calculation
  • Clear — clear history
  • on Top — keep window always on top

Additionally, the menu color scheme changes dynamically when “on Top” is enabled — a small but pleasant visual improvement.

📥 Final Result

The updated converter is:

  • more convenient
  • faster
  • more compact
  • visually cleaner
  • better for continuous use on a desktop

Exactly what you need for quick, precise metric–imperial conversions throughout the day.

Download v2: https://drive.google.com/file/d/1Efd0PXVU8rAxeim1SMTP8Bz7niGjkBZE/view?usp=sharing



If you enjoyed this program and would like to support the author, you can do so here:

No comments:

Post a Comment

комментарий появиться (или нет) после модерации

Popular: